Practical No 1 and 2: Setup a Java Programming Development environment and test using small program.

1) Write installation directory path of your directory?
Ans=>  C:\Program Files\Java\jdk-10.0.2

2) Write value of path environment variable?
Ans=> C:\Program Files\Java\jdk-10.0.2\bin

3) List folders created after installation.
Ans=> One folder main named as "Java".
            Inside that one folder jdk-10.0.2.

4) Main method is declared as static. Justify
Ans=> Hence the java interpreter call the main method before any method therefore it has static                      keyword. Since static method can be invoked without creating a need of object/instance of class.

5) Program is named with class containing main method. Justify.
Ans=> Because after compiling the program Java will create the Byte code of name as per the Class                name. So to run that byte code we require the class name. So in general we named the program as per the class name.

Previous
Next Post »

1 Comments:

Click here for Comments
Unknown
admin
January 10, 2019 at 10:52 PM ×

Thanx mr.Atharav Agrawal for giving such questions once again thanks........🙏🙏🙏🙏🙏

Thank You Unknown For Comment.
Reply
avatar