Create a java program from scratch ie using a text editor


1) Create a Java program from scratch (i.e. using a text editor like Notepad) that produces and output saying "Hello World." You first need to create the source file (HelloWorld.java). Then from the command line, you need to compile it with javac (javac HelloWorld.java) to create the executable file HelloWorld.class. Finally to execute it you can type: java HelloWorld.

2) Create a Java program from scratch that outputs three lines, using three println statements. The first line will contain your name, the second line will show where you were born, and third line your hobby (or hobbies). Modify the code to create all the output with a single print statement.

3) Create a Java program that declares variables of the following types: int, double, boolean, char, and String. Initialize those variables to some values of your choice, and output the values stored in those variables using println statements.

4) Create a Java program that calculates the area and the circumference of a circle given its radius. (Use Math.PI to get the value of p.)

5) Create Java program that converts from Fahrenheit to Celsius and from Celsius to Fahrenheit. The formula for the conversion is C/5 = (F-32)/9.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Create a java program from scratch ie using a text editor
Reference No:- TGS02448109

Now Priced at $25 (50% Discount)

Recommended (97%)

Rated (4.9/5)