Question1. Illustrate the purpose of comments when writing programs in Java.
Question2. Name the types of comments accessible and illustrate with simple examples.
Question3. What is the purpose of the ‘import’ statement in the Java programs?
Question4. With the aid of an illustration show the syntax for importing one class from a package and all the classes from that package.
Question5. Explain the steps we need to write a Java application and to run the program. Also explain the tools required for each step.
Question6. Describe the differentiation between object declaration and object creation. Illustrate your answer with a suitable example.
Question7. Write a Java application that accepts a person’s weight and displays the number of calories the person requires in one day. A person needs 38 calories per Kg of body weight, so the formula would be calories = bodyweight * 38;
Question8. Here you might use an input dialog from the class JOptionPane to request the user to enter the body weight and a message dialog to output calories required.