Search for question
Question

Assignment 2 (JAVA)

Question 1. Run the command java --version, give the output. What does it mean?

Question 2. What are the commands cd and la (dir if you use Windows) for? If you just opened your console (terminal/command prompt/power shell), how can you change the current working directory to desktop? Give the full command. If you now run 18 or dir, does this look familiar? What does the output mean? Use an online search engine for this question if you don't know the answer.

Question 3. Use the Java Development Kit Version 19 API Specification to find the documentation for the java.lang.String.charAt(int). What is the return type of this public function of the String class? What does it do?

Question 4. What does "Bonjour!".charAt(0) return?

Question 5. Watch Sigma notation for sums, write the following in the sigma notation,

2¹ +2² +2³+ + 2¹0

Question 6. Read the relevant parts of the textbook as described in the online classroom. Write a Java program that reads some positive integer n and prints out a table with the Gregory series approximations and their distance (error) from the real ,

Question 7. What was the hardest part of this assignment for you? Why do you you struggled with this?

Fig: 1