JAVA P8 test quiz
- Question 1. What does the if CONDITION command {Block command} work?
- 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
-
- 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
-
4 ★ | 1 Vote
You should read it
May be interested
- JAVA test on P6multiple choice questions about java programming give you useful knowledge. if you love java programming, don't skip the series of interesting tests below by network administrator.
- Test on JAVA test P7a set of multiple-choice questions about java gives you useful knowledge for work and study. the set of questions below includes 10 sentences for you to experience.
- eQuiz - Multiple choice test on JDBC - Part 1in the quiz below, we will introduce you to part 1 of the jdbc basic knowledge test series with 15 questions.
- [QUIZ] Test your understanding of SQL - Part 7part 7 of the sql quiz goes into the sql practice exercises that follow the previous period.
- What is Java? Why choose Java?what is java? java is a high-level programming language, developed by sun microsystem and released in 1995. java runs on a variety of platforms, such as windows, mac and various versions of unix.
- [QUIZ] Test your understanding of SQL - Part 1sql is a familiar term if you pay attention to the computer field. so what do you know about sql?
- [QUIZ] Test your understanding of SQL - Part 3the test set comes with sql lessons that give you lots of useful knowledge.
- [QUIZ] Test your understanding of SQL - Part 6in order to serve your work and your study, along with sql lessons, quantrimang offers a variety of useful questions.
- Computer network test with answer P11continue the series of tests on computer networks, in this section i will increase the number of questions for you to try to test your computer network knowledge. do not skip the previous network quiz section again.
- Test on JAVA P10 testmultiple choice questions on java programming help you test your basic knowledge of this programming language. the set of questions includes 10 sentences to try.