• 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
The following fraction of codedouble STATIC = 2.5 ;System.out.println( STATIC );

Prints 2.5
Rraises an error as STATIC is used as a variable which is a keyword
Raises an exception
None of these

ANSWER DOWNLOAD EXAMIANS APP

Data Types and Variables
What would be the output of the following fraction of code ?int Integer = 34 ;char String = 'S' ;System.out.print( Integer ) ;System.out.print( String ) ;

34 S
34
Does not compile as Integer and String are API class names.
Throws exception.
S

ANSWER DOWNLOAD EXAMIANS APP

Data Types and Variables
What is the output of the following program?public class Test{static int x = 10 ; public static void main(String[] a){ Test test = new Test( ) ; Test test1 = new Test( ) ; test.x += 1 ; System.out.println( test.x + test1.x ) ; }}

21
Compilation Error
20
Throws Exception
22

ANSWER DOWNLOAD EXAMIANS APP

Data Types and Variables
What will be output of the following program code?public class Test{public static void main(String[] a){short x = 10;x = x*5;System.out.print(x);} }

10
None of these
Compilation Error
50

ANSWER DOWNLOAD EXAMIANS APP

Data Types and Variables
Determine output:public class Test{int i = 34;public static void main(String args[]){Test t1 = new Test();Test t2 = new Test();t1.i = 65;System.out.print(t1.i);System.out.print(t2.i);}}

65 34
65 65
34 34
34 65

ANSWER DOWNLOAD EXAMIANS APP
  • «
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • »

GO TO PAGE

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
↑