JAVA
2.7K subscribers
73 photos
111 files
76 links
Download Telegram
What will be the output of the following pseudocode?

Integer p, q, r
Set p = 4, q = 4, r = 8
q = 8 + r
if((p + q) < (q-p))
if((p ^ q ^ r) < (q + r + p))
r = (11 & 7) ^ p
p = (11 ^ 8) + q
End if
q = (p + q) + r
End if
q = (p + q) + r
Print p + q + r
Options
Anonymous Quiz
19%
44
32%
50
23%
37
26%
40
Will the following code compile correctly?

abstract class AirPlane{
abstract void fly();
void land(){//Line 3
System.out.println("Landing ........");
}
}
class AirJet extends AirPlane{
AirJet(){
super();//Line 9
}
void fly(){
System.out.println("Flying ........");
}
}
What will be the output of the following code?

class A{
int i=10;
public void printValue(){
System.out.print("Value-A ");
}
}
class B extends A{
int i=12;
public void printValue(){
System.out.print("Value-B ");
}
}
public class Main
{
public static void main(String[] args) {
A a=new B();
a.printValue();
System.out.println(a.i);
}
}
What will be the output?

public class Main
{
public static void main(String[] args) {
int num1, num2;
try{
num1 = 0;
num2 = 62/num1;
System.out.println("Try block message");
System.exit(0);
} catch(ArithmeticException e){
System.out.println("Error : Don't divide a number by zero");
System.exit(0);
} finally {
System.out.println("Give another number of num1");
}
}
}
Choose the correct option.

Which code segment should be used in place of missing Statement in the below code such that it displays the list of all root directories of the available system?

// Missing Statement

for(int i=0;i<dirs.length;i++)
System.out.println("Root["+i+"] : "+dirs[i]);
👍2😁1
What is the return type of Lambda expression?
Anonymous Quiz
18%
String
30%
Object
23%
Void
30%
Function
🤔15😁1
Which Spring annotation is used to create RESTful Web services using Spring MVC.
Anonymous Quiz
6%
🤔1