Ultimate Quiz On Java Skills! Trivia

10 Questions | Total Attempts: 13481

SettingsSettingsSettings
Please wait...
Ultimate Quiz On Java Skills! Trivia

.


Questions and Answers
  • 1. 
    How will you describe Java?
    • A. 

      Programming Language

    • B. 

      Platform

    • C. 

      Both Programming Language and Platform

    • D. 

      Abstract Machine

  • 2. 
    • A. 

      True

    • B. 

      False

  • 3. 
    • A. 

      1abc

    • B. 

      Abc_1

    • C. 

      OneAbc

    • D. 

      Final

    • E. 

      $while

  • 4. 
    The package __________ is automatically imported in every java program.
  • 5. 
    What will the function Math.ceil(-99.9) return?
    • A. 

      -99

    • B. 

      99.0

    • C. 

      100.0

    • D. 

      -99.0

    • E. 

      -100.0

  • 6. 
    What will be the output of the following code segment?String one="one";String two="two";String One=new String(one);String Two=two;if(one==One)System.out.println("Java is fun!");if(one.equals(One)==true)System.out.println("Programming needs practice.");if(one==Two)System.out.println("OOP is the way!");if(two.equals(Two)==true)System.out.println("Explore the world of Java.");
    • A. 

      Java is fun! Programming needs practice.

    • B. 

      Java is fun! Programming needs practice. Explore the world of Java.

    • C. 

      Programming needs practice Explore the world of Java.

    • D. 

      Programming needs practice. OOP is the way! Explore the world of Java.

    • E. 

      Java is fun! Programming needs practice. OOP is the way! Explore the world of Java.

  • 7. 
    • A. 

      A = 20 b = 10

    • B. 

      A = 10 b = 20

    • C. 

      A = 30 b = 10

    • D. 

      A = 10 b = 30

    • E. 

      Compile-time error

  • 8. 
    • A. 

      1 4

    • B. 

      14

    • C. 

      4

    • D. 

      7

    • E. 

      Nothing. It will give compile-time error.

  • 9. 
    What will be the output of the following code segment?int a = 4, b = 8, c = -5; System.out.println(a/b+"\n"+(++c*b--)+" "+a--*b/c--);
    • A. 

      0 -32 -7

    • B. 

      0.5 32 6

    • C. 

      0 40 -7

    • D. 

      0.5 -32 -7

    • E. 

      0 -32 -7

  • 10. 
    Which of the following group consists of only Object-Oriented languages?
    • A. 

      C,C++,JAVA

    • B. 

      C,JAVA,RUBY

    • C. 

      C++,JAVA,BASIC

    • D. 

      BASIC,FORTRAN,JAVA

    • E. 

      C++,JAVA,C#