Professional Documents
Culture Documents
11. What is the valid way to declare an integer variable named num?
a. Int num; b. int num; c. integer num; d. num int;
12. Give the answer to the following code sequence:
int num=4;
int result= num/0;
System.out.print(result) ;
13. Give the answer to the following code sequence:
double grade=2.5/0;
System.out.print(grade) ;
14. Give the answer to the following code sequence:
double num=0.0/0.0;
System.out.print(num) ;
15. Give the answer to the following code sequence:
int num= 4/2*2;
System.out.print(num) ;
II. Problem Solving. Write the program code of the following: (10 pts each).
1. Directions: Write a program that prints the three first letters of your name. You’re
your program code here:
2. Directions: Write a Java application using JOptionPane that will input your given name but
the output will be your complete name following order: LastName, GivenName
MiddleName
your program code here:
3. Directions: Write a Java application that will accept three numbers and that will
compute the average. Your program is required to apply type casting (implicit or
explicit).
your program code here:
Prepared by:
ALVIN S. ENRICO
Instructor
Noted: