- If CONDITION is correct then execute the Block command, if it is wrong, skip it
- If the CONDITION is wrong, then execute the Block command, if it is correct then skip it
- All is wrong
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.
- Question 1. What does the if CONDITION command {Block command} work?
- Question 2. If CONDITION order {Block command 1} else {Block command 2} does it work?
- If CONDITION is correct, execute Block 1, if wrong, execute Block 2
- If CONDITION is wrong, execute Block 1, if it is correct, execute Block 2
- If CONDITION is wrong, execute Block 1, if it is correct, skip.
- If CONDITION is correct then execute Block 2, if it is wrong, skip
-
- Question 3. The following message variable results in:
String expletive = 'Expletive';
String PG13 = 'deleted';
String message = expletive.substring (1,3) + PG13;- xpl bị xóa
- Exp edeleted
- ple bị xóa
- xpldeleted
-
- Question 4. The following statement prints the result:
int age = 13;
String message = 'PG' + age;- PG13
- PG 13
- PG age
- PGage
-
- Question 5. To check whether the two strings are equal, which method?
- string1 == string2
- string1 = string2
- string1.equals (string2)
- string1.equal (string2)
-
- Question 6. What does charAt (n) command do?
- Search for the nth character
- Returns the n-1 second character
- Returns the nth character
- Returns the character with the index position n
-
- Question 7. What is the result of the following command?
String greetings = 'Hello';
char letter = greetings.charAt (0);- HOUR
- e
- first
- o
-
- 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);- The perfect virgin
- Phuong virgin has a thought
- -1.6
- Compilation error
-
- 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);- The perfect virgin
- Phuong virgin has a thought
- -1.6
- Compilation error
-
- 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);- Solve the first order equation
- Solve quadratic equations
- Solve the first order system
- Solve quadratic equation system
-
Update 24 May 2019
tutorialmultiple choicetestJAVAprogrammingeQuizknowledgebasictechnicaloptimizationlanguagejava programmingprogramming for java part 9
You should read it
- JAVA test on P6
- JAVA test on P4
- Test on JAVA test P5
- JAVA test test P1
- JAVA test on P3
- Test on JAVA test P7
- Testing test on JAVA P2
- Test on JAVA P10 test
- Test on JAVA test on P9
- eQuiz - Multiple choice quiz about JAVA
- eQuiz - Multiple choice test on Java Swing Practice - Part 2
- eQuiz - Quiz on Core Java - Part 2
Maybe you are interested
Plot Mafia III: Start the journey of revenge and build a new mafia empire - P.2 The strange forest area looks like a chessboard when viewed from above Mafia in the game - Life and death with numbers, richness due to heaven Impressive image: ISS International Space Station flies over the Sun. Russian spacecraft 'resupply' successfully 3 tons of cargo for the ISS in just 3 hours How clean are astronauts keeping the space station?