Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

Name: Year and Section: Date:

Activity

1.
Give 5 examples of valid identifiers Give 5 examples of invalid identifiers

2. Create a class named <YourFirstName>. The program should output on the screen:

Hi, I am <YourFirstName> and this is my first programming activity in Java.


Java programming is fun!!!

3. Given the table,, declare the following variables with the corresponding data types and initialize values. Output
to the screen the variable names together with the values.

Data Type Variable Name Initial Value


int intValue 20
double doubleValue 12.50
boolean isITMajor true
char letter A
String msg This is a Java program.

Expected output:

You might also like