• HOME
  • QUIZ
  • CONTACT US
EXAMIANS
  • COMPUTER
  • CURRENT AFFAIRS
  • ENGINEERING
    • Chemical Engineering
    • Civil Engineering
    • Computer Engineering
    • Electrical Engineering
    • Mechanical Engineering
  • ENGLISH GRAMMAR
  • GK
  • GUJARATI MCQ

Data Types and Variables

Data Types and Variables
How many primitive data types are there in Java?

8
7
9
6

ANSWER DOWNLOAD EXAMIANS APP

Data Types and Variables
Size of float and double in Java is

32 and 32
32 and 64
64 and 32
64 and 64

ANSWER DOWNLOAD EXAMIANS APP

Data Types and Variables
Determine output:class A{ public static void main(String args[]){ int x; x = 10; if(x == 10){ int y = 20; System.out.print("x and y: "+ x + " " + y); y = x*2; } y = 100; System.out.print("x and y: " + x + " " + y); }}

10 20 10 10
Error
10 20 10 100
10 20 10 20

ANSWER DOWNLOAD EXAMIANS APP

Data Types and Variables
Which of the following automatic type conversion will be possible?

byte to int
long to int
int to long
short to int

ANSWER DOWNLOAD EXAMIANS APP

Data Types and Variables
What will be output of following program?public class Test{ public static void main(String[] args){ byte b=127; b++; b++; System.out.println(b); }}

129
-127
None of these
Compiler error
2

ANSWER DOWNLOAD EXAMIANS APP

Data Types and Variables
Determine output:public class Test{ int a = 10; public void method(int a){ a += 1; System.out.println(++a); } public static void main(String args[]){ Test t = new Test(); t.method(3); }}

5
None of these
4
11
12

ANSWER DOWNLOAD EXAMIANS APP
MORE MCQ ON Data Types and Variables

DOWNLOAD APP

  • APPLE
    from app store
  • ANDROID
    from play store

SEARCH

LOGIN HERE


  • GOOGLE

FIND US

  • 1.70K
    FOLLOW US
  • EXAMIANSSTUDY FOR YOUR DREAMS.
  • SUPPORT :SUPPORT EMAIL ACCOUNT : examians@yahoo.com

OTHER WEBSITES

  • GUJARATI MCQ
  • ACCOUNTIANS

QUICK LINKS

  • HOME
  • QUIZ
  • PRIVACY POLICY
  • DISCLAIMER
  • TERMS & CONDITIONS
  • CONTACT US
↑