JAVA P8 test quiz

If you are interested in learning about the Java programming language, the following quiz of Network Administrator will provide you with a lot of useful knowledge for your learning.

  1. Question 1. What does the if CONDITION command {Block command} work?
    1. If CONDITION is correct then execute the Block command, if it is wrong, skip it
    2. If the CONDITION is wrong, then execute the Block command, if it is correct then skip it
    3. All is wrong
  2. Question 2. If CONDITION order {Block command 1} else {Block command 2} does it work?
    1. If CONDITION is correct, execute Block 1, if wrong, execute Block 2
    2. If CONDITION is wrong, execute Block 1, if it is correct, execute Block 2
    3. If CONDITION is wrong, execute Block 1, if it is correct, skip.
    4. If CONDITION is correct then execute Block 2, if it is wrong, skip
  3. Question 3. The following message variable results in:
     String expletive = 'Expletive'; 

    String PG13 = 'deleted';

    String message = expletive.substring (1,3) + PG13;
    1. xpl bị xóa
    2. Exp edeleted
    3. ple bị xóa
    4. xpldeleted
  4. Question 4. The following statement prints the result:
     int age = 13; 

    String message = 'PG' + age;
    1. PG13
    2. PG 13
    3. PG age
    4. PGage
  5. Question 5. To check whether the two strings are equal, which method?
    1. string1 == string2
    2. string1 = string2
    3. string1.equals (string2)
    4. string1.equal (string2)
  6. Question 6. What does charAt (n) command do?
    1. Search for the nth character
    2. Returns the n-1 second character
    3. Returns the nth character
    4. Returns the character with the index position n
  7. Question 7. What is the result of the following command?
     String greetings = 'Hello'; 

    char letter = greetings.charAt (0);
    1. HOUR
    2. e
    3. first
    4. o
  8. Question 8. What is the following block of output with a = 5, b = 8?
     double a, b; 

    if (a == 0)

    if (b! = 0) System.out.println ('Suspicious Phuong Trinh');

    else System.out.println ('Phuong Trinh is suspicious');

    else System.out.println (-b / a);
    1. The perfect virgin
    2. Phuong virgin has a thought
    3. -1.6
    4. Compilation error
  9. Question 9. What is the following block of output with a = 0, b = 0?
     double a, b; 

    if (a == 0)

    if (b! = 0) System.out.println ('Suspicious Phuong Trinh');

    else System.out.println ('Phuong Trinh is suspicious');

    else System.out.println (-b / a);
    1. The perfect virgin
    2. Phuong virgin has a thought
    3. -1.6
    4. Compilation error
  10. Question 10. What does the following block do?
     double a, b; 

    if (a == 0)

    if (b! = 0) System.out.println ('Suspicious Phuong Trinh');

    else System.out.println ('Phuong Trinh is suspicious');

    else System.out.println (-b / a);
    1. Solve the first order equation
    2. Solve quadratic equations
    3. Solve the first order system
    4. Solve quadratic equation system
Update 24 May 2019
Category

System

Mac OS X

Hardware

Game

Tech info

Technology

Science

Life

Application

Electric

Program

Mobile