Object oriented concepts UE Past Papers Questions.


View All Courses

(122) Question Category: Short answers

Write the following code into condition operator
if(gender==1)
System.out.println("Woman");
else
System.out.println("Man");

Answer / Solution

UNSOLVED

(123) Question Category: Practical

Write a Java statement to accomplish each of the following tasks
Declare variables sum and x to be of type int.
Assign 1 to variable x.
Assign 0 to variable sum.
Add variable sum, and assign the result to variable sum.
Print "The sum is:", followed by the value of the variable sum.

Answer / Solution

UNSOLVED

(124) Question Category: Short answers

What is the output of the following programs
Prog#1
public class Break Test{
public static void main(String[]args){
int count;
for(count=1; count≤20; count++){
if(count==8)
break;
System.out.println(count);
}
}
}


Prog#2
public class ContinueTest{
public static void main(String[]args){
for(int count=1;count≤10;count++){
if(count==5)
continue;
System.out.println(count);
}
}
}

Answer / Solution

UNSOLVED

(125) Question Category: Short answers

What will be the out put of the following for-loop ?
for(int i=1; i<7; i++){
System.out.println(i);

Answer / Solution

UNSOLVED

(126) Question Category: Short answers

Data type are categorized into two , mention and differentiate them.

Answer / Solution

UNSOLVED

View All Courses
News & Updates | Recently
Recent Updates
questions

2024-05-02: questions

Questions Uploaded on 2024-05-02


questions

2024-03-29: questions

Questions Uploaded on 2024-03-29


questions

2024-03-19: questions

Questions Uploaded on 2024-03-19

Dismissible in 10 seconds