Test on JAVA test P7
- Question 1. Which method is used to search a string in another string in Java's String class?
- astIndexOf ()
-
- substring ()
-
- toString ()
- No answer right
-
- Question 2. In Java, what data type is an object's address or an array created in memory?
- Primitive type
- Reference type
- Format
- There is no right answer
-
- Question 3. What is the function of the while loop?
- Check the result of the boolean expression
- Avoid conflict between inside and outside the switch
- Repeat the command block to see if the condition is correct
- No answer right
-
- Question 4. Java provides a number of commands that change control flow based on conditions. Which command stops the operation of the inner lap and starts the next statement immediately after the block?
- break
- tiếp tục
- thay đổi
- jump
-
- Question 5. Result = condition command? What does value1: value2 mean?
-
- If condition is true then result = value2, if condition is false, result = value1
- If condition is true then result = value1, if condition is false then result = value2
- There is no such command
- If condition is true, the result will invert the value of value1 and value2
-
- Question 6. Which command stops the current loop and starts the next loop?
- tiếp tục
- break
- cease
- end
-
- Question 7. Which of the following statements is correct?
- int [] a;
- int a [];
- int a [] = new int [10];
- All 3 statements are correct
-
- Question 8. How many changes of the array object reference and variable exist after executing the block?
String [] students = new String [10];
String studentName = 'Peter Parker';
students [0] = studentName;
studentName = null;- first
- 2
- 3
- 4
-
- Sentence 9. Assumption Rectangle class is defined and not false. When running, the program reported an error because:
public class SomeWrong {
public static void main (String [] args) {
MyRect Rectangle;
myRect.width = 40;
myRect.height = 50;
System.out.println ('Standard delivery:' + myRect.area ());
}
}- MyRect has not been initialized yet
- There is no processing method
- There is no static keyword
- The program is not wrong
-
- Question 10. To inverse the value of a boolean variable, which operator do we use?
- !
- >>
- <<
- >>>
-
4 ★ | 2 Vote
You should read it
May be interested
- Test on JAVA test on P9unlike most common programming languages, instead of compiling the source code into machine code or interpreting source code when running, java is designed to compile the source code into bytecode, then bytecode will be run by the runtime environment. . to help you better understand this programming language, the following quiz of network administrator will give you lots of useful knowledge.
- Get familiar with NetBeans Java IDEin the following article, we will introduce you the most basic features of netbeans ide through a small test, which is to create the 'hello world' java application. and when finished, you will know the general knowledge and process when programming applications in ide ...
- Testing test on JAVA P2multiple choice questions on java programming help you test your basic knowledge of this programming language. the set of questions includes 10 sentences to try.
- JAVA P8 test quizif 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.
- Basic Java syntaxa java program can be defined as a collection of objects, communicating through calling each other's procedures. now we will look at the class, object, procedure and instance variable / instance variable to consider their meaning.
- eQuiz - Multiple choice test on Java Swing Practicewelcome to the test series of tipsmake.com with topics related to the fields of information technology. and this time we will continue with the java swing practice test, a total of 13 questions will be answered with no time to answer each sentence. there will be some questions with many different answer options
- What is JAVA file? How to open, edit and convert JAVA filesa file with a .java extension is (or sometimes also used in .jav format) is a java source file written in the java programming language.
- eQuiz - Multiple choice quiz about JAVAfollowing are multiple-choice questions related to java programming language, there will be 23 questions in total with no answer for each time. let's get started!
- Download and install Java on the computerto program java on your computer, you need to install the java environment, this tutorial will show you how to download and install java on your computer.
- Basic Java exercises, with sample decodingto serve your java learning needs, tipsmake.com has synthesized some java exercises from many sources, including sample code (for some articles). hopefully it can be helpful to learn your java programming language.