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.
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.
1 Comments:
Click here for CommentsThanx mr.Atharav Agrawal for giving such questions once again thanks........🙏🙏🙏🙏🙏