How do you run a java program?



How do you run a java program?..

Answer / Rohit Arora

To run a Java program, save your code in a .java file, compile it using 'javac followed by the filename' in the command line to generate a .class file, and then execute the .class file using 'java followed by the class name'

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More J2EE Interview Questions

Is java 100 percent pure object oriented?

1 Answers  


Since we can create managed bean by two ways as, we can define the bean name in faces-config.xml file so that page can use that OR we can write annotation on bean class so that it is automatically assign to page but I want to know which one is good programming practice ? And also mention disadvantage of other which should not prefer ... Thanking you...

1 Answers   ASD Lab,


What are web technologies in java?

1 Answers  


What are the topics in j2ee?

1 Answers  


Difference between save and saveorupdate?

1 Answers  


Is java is a high level language?

1 Answers  


Is java gui dead?

1 Answers  


Describe the ear, war, and jar.

1 Answers  


What is java naming and directory service?

1 Answers  


What is general entity?

1 Answers  


Why class is used in java?

1 Answers  


Diffrence between arraylist and hashmap

3 Answers   Oracle,


Categories