Friday, 1 September 2023

Lesson 7: Creating, Compiling, and Executing the program

Note: Before you start to code you need to download the API or JDK (Java Development tool kit) that  you can download on the internet. You may click the link below.

Java Development tool kit download link👈👈👀


CREATING

_________________________________________________________________

1. public class Welcome 

2. {

3.   public static void main(String[] args)

4.    {

5.   System.out.println("Welcome to Java!");

6.    }

7. }

__________________________________________________________________


COMPILING




EXECUTING THE PROGRAM
1st. You need to go to the folder where you save your Java program code.


Executing using CMD prompt or command prompt

1st Step

Step 2

3rd Step
4th step

CHECK-POINT

1.28 What is a keyword? List some Java keywords.

1.29 Is Java case sensitive? What is the case for Java keywords?

1.30 What is a comment? Is the comment ignored by the compiler? How do you denote a

comment line and a comment paragraph?

1.31 What is the statement to display a string on the console?

1.32 Show the output of the following code:

Note:

1. Please write your answers on a piece/s of bond paper

2. Please observe a margin.

3. No erasures; and

3. Write legibly.

_____________________________________________________

   ~o~ End of the lesson ~o~
_____________________________________________________
Thank you God bless!

No comments:

Post a Comment