0% found this document useful (0 votes)
26 views3 pages

Operators - Java Programming MCQ Questions and Answers Page-1 Section-1

Uploaded by

Vinod Saraswat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views3 pages

Operators - Java Programming MCQ Questions and Answers Page-1 Section-1

Uploaded by

Vinod Saraswat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

 Search here ...

 Login (http://www.examveda.com/account.php?url=http%3A%2F%2Fwww.examveda.com%2Fjava-program%2Fpractice-mcq-question-on-operators%2F)

(http://www.examveda.com/)

Home (http://www.examveda.com/) Aptitude (http://www.examveda.com/mcq-question-on-arithmetic-ability/) Computer 

English (http://www.examveda.com/mcq-question-on-competitive-english/)

Reasoning (http://www.examveda.com/mcq-question-on-competitive-reasoning/) Current A airs (http://www.examveda.com/daily-current-a airs/)

DI (http://www.examveda.com/mcq-question-on-data-interpretation/) GK (http://www.examveda.com/mcq-question-on-general-knowledge/)

Paper (http://www.examveda.com/download-free-paper/) Ask Question (http://www.examveda.com/ask-question/)

Operators -Java Programming MCQ Questions and Answers, Page-1, Section-1


Home (http://www.examveda.com/) / Java Program (http://www.examveda.com/mcq-question-on-java-program/) / Operators

Java Program

Chapter 

1.
int x = 0, y = 0 , z = 0 ;
x = (++x + y­­ ) * z++;

What will be the value of "x" after execution ?

A. -2

B. -1

C. 0

D. 1

E. 2

Answer & Solution Discuss in Board (http://www.examveda.com/java-programming-on-operators-1)

Share (http://www.facebook.com/share.php?u=http://www.examveda.com/java-programming-on-operators-1)

2.
int ++a = 100 ;
System.out.println( ++a ) ;

What will be the output of the above fraction of code ?

A. 100
B. Displays error as ++a is not enclosed in double quotes in println statement

C. Compiler displays error as ++a is not a valid identi er 

D. None of these

Answer & Solution Discuss in Board (http://www.examveda.com/java-programming-on-operators-2)

Share (http://www.facebook.com/share.php?u=http://www.examveda.com/java-programming-on-operators-2)

3. What is the output of the following program ?

class Numbers{
public static void main(String args[]){
int a=20, b=10;
if((a < b) && (b++ < 25)){
System.out.println("This is any language logic");
}
System.out.println(b);
}
}

A. 12

B. 11

C. 10 

D. Compilation Error

Answer & Solution Discuss in Board (http://www.examveda.com/what-is-the-output-of-the-following-program-java-programming-on-operators-3)

Share (http://www.facebook.com/share.php?u=http://www.examveda.com/what-is-the-output-of-the-following-program-java-programming-on-operators-3)

4. Select from among the following character escape code which is not available in Java.

A. \t

B. \r 

C. \a 

D. \\

E. \v 

Answer & Solution Discuss in Board (http://www.examveda.com/select-from-among-the-following-character-escape-code-which-is-not-available-in-java-java-programming-on-operators-4)

Share (http://www.facebook.com/share.php?u=http://www.examveda.com/select-from-among-the-following-character-escape-code-which-is-not-available-in-java-java-programming-on-
operators-4)

5. What will be the output?


if(1 + 1 + 1 + 1 + 1 == 5){
System.out.print("TRUE");
}
else{
System.out.print("FLASE");
}

A. TRUE 

B. FALSE 

C. Compiler Error 

D. None of these 

Answer & Solution Discuss in Board (http://www.examveda.com/what-will-be-the-output-java-programming-on-operators-5)

Share (http://www.facebook.com/share.php?u=http://www.examveda.com/what-will-be-the-output-java-programming-on-operators-5)

1 2 (http://www.examveda.com/java-program/practice-mcq-question-on-operators/?page=2)

3 (http://www.examveda.com/java-program/practice-mcq-question-on-operators/?page=3)

 (http://www.examveda.com/java-program/practice-mcq-question-on-operators/?page=2)

All Categories

Arithmetic Ability 

Competitive Reasoning 

Competitive English 

Data Interpretation 

General Knowledge 

Computer Fundamentals 

Networking 

C Program 

Java Program 

SQL 

Current A airs 

Banking Awareness 

You might also like