Questions Java Compiler and runtime


1) Can you save java source file by other name than the class name ?

Answer: Yes, if the class in file not pulbic. the figure bellow:

Compiler: javac abc.java

Runtime: java Simple.class

Note: The JRE only has java, not javac but JDK has both.

 

2) Can you have multi classes in a java source file ?

Answer: yes , the figure bellow




    This section is non commercial mainly sharing and advance knowlage for java.This tutorials has referenced document from the list below if you has complain for license, i will remove all from internet. Thank you all everything.

https://www.javatpoint.com/internal-details-of-hello-java-program






0 comments :

Post a Comment

Cancel Reply

About Me

My photo
Tân An, Long An, Vietnam
Hello everyone, I love programming, I love making friends with people all over the world.