Page 70 - TP_iPlus_V2.1_Class8
P. 70
D. Match the following:
1. ! a. Assignment operator
2. *= b. Arithmetic operator
3. <= c. Relational operator
4. / d. Logical OR operator
Section B (Subjective)
A. Short answer type questions:
1. What is the difference between procedural and object oriented programming language?
2. What is inheritance and polymorphism?
3. Define arithmetic operators.
B. Long answer type questions:
1. List any four features of Java.
2. What are logical operators? Write the names of any two logical operators.
3. What is the use of unary operators? How many unary operators are there in Java?
C. What will be the output of these Java codes?
Write output here:
1. public class rad{
public static void main(String[] args){
double r, c;
r=2.3;
c = 2 * 3.14 * r;
System.out.println(c);
}
}
2. public class A{ Write output here:
public static void main(String[] args)
{
double s, GST, inv;
s = 200;
GST = 5 * s/100;
inv = s + GST;
System.out.println("GST to be paid:" + GST);
System.out.println("Total invoice value:" + inv);
}
}
3. public class program{
public static void main(String[] args){
68
iPlus (Ver. 2.1)-VIII

