Section A (40 marks)
Answer the following questions. [5X2=10]
Convert the following to the java expression.
(a4+b2)3
What will be the value of x if
x=10
x+=–x+x–+10;
What is malware, explain any one?
Explain the following
What is spam?
Who are hackers?
Explain the following
Token
Object
Write the output of the following [5]
Math.pow(4,3);
Math.max(Math.pow(4,2),18);
Math.min(Math.ceil(61.2),Math.floor(61.2));
Math.round(Math.sqrt(25),+1.5);
Math.PI55;
Expand these [5]

ISP
SMTP
JVM
FTP
TCP/IP

Answer the following questions [5X2=10]
Write the syntax of the Ternary operator.
Rewrite the following code with the switch case.
If(flag==0)
System.out.println(“Prime number”);
If(flag==1)
System.out.println(“Not a Prime number”);
Else
System.out.println(“Wrong input”);
What will be the output of the following code?
Int n=4;
System.out.println((n%2==0)?”Even”:”Odd”);
State the output.
{
int a;
for(a=5;a<20;a++)
{
If(a==10)
break;
System.out.println(a);
}
}
State the difference between = and == operator.
Answer the following questions
Explain the use of the following [3]
BufferedReader
Interger.parseInt();
br.readLine();
Explain what is JVM , what is byte code & source code? [3]
Explain the following principals of OOP [4]
Encapsulation
Abstraction
OR

  1. Explain conditional control statements and looping control statement in detail whit their use supported with Syntax. [4]

Section B (60 marks)
Write JAVA Programs with Dry run and output of the program when necessary (Attempt any six) [60]

Write a program to Display the following pattern. [10]

1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
?
??
???
????
?????

Write a program to Display the following pattern. [10]

11111
1111
111
11
1

Write a program to enter roll number, 2 subject’s marks for 5 students. Calculate and print the following [10]
Roll number of student who got average >90
Roll number of student who got average <35 Write a program to print the following series. [10] 0,3,8,15,24 5 10 15 20 25 …..n Write a program to print the Fibonacci series for first 10 numbers. [10] Write a program using parameterized method to accept 4 values, find and print the average of the numbers. [10] Write a program to enter any limit & print the sum of the following series sum=1+X2/2+X4/4+X6/6……….+Xn/n [10] Write a program to display the even and odd numbers between 1 to 100 and print their sum also. [10] Write a program to enter any limit & print the sum of the following series sum=1 /2+3/4+5/6……….+n-1/n [10] Write a program to ask user to enter basic salary of employee & calculate net pay. Net pay= basic salary – income tax [10] Income tax is calculated based on following Basic salary <20000–🡪 income tax 5% of basic salary Basic salary >20000–🡪 income tax 10% of basic salary

LEAVE A REPLY

Please enter your comment!
Please enter your name here