Write steps required to code a java program on the computer.
Advertisements
प्रश्न
Write steps required to code a java program on the computer.
विस्तार में उत्तर
Advertisements
उत्तर
- Install Java Development Kit (JDK): Install the JDK on the computer to compile and execute Java programs.
- Open a Text Editor: Open a text editor such as Notepad or a Java IDE to write the program.
- Write the Java Program: Type the Java program using proper syntax, class declaration and the
main()method. - Save the Program: Save the program with the
.javaextension. The filename should match the public class name, if one is declared. - Compile the Program: Open Command Prompt and type
javac Filename.javato compile the program and check for errors. - Correct the Errors: If compilation errors occur, correct them and compile the program again.
- Execute the Program: Type
java ClassNamein Command Prompt to run the compiled program. - Check the Output: Observe the output displayed on the screen and verify the results.
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
