Test on JAVA P10 test
- Question 1. Given str = 'Yunlin university', what is the result of str.lastIndexOf ('i')?
- 4
- 14
- 7
- There is no right answer
-
- Question 2. Given str = 'Yunlin university', what is the result of str.lastIndexOf ('i', 7) returning results?
- 4
- 14
- 7
- -first
-
- Question 3. Given str = 'Yunlin university', what is the result of str.lastIndexOf ('sti')?
- 4
- 14
- false
- -first
-
- Question 4. After running the command block s =?
int s = 0;
for (int i = 3; i <10; i ++)
s + = i;- 42
- 55
- 9
- 29
-
- Question 5. After running the command block s =?
for (int i = 0; i <= 10; i ++) {
int s = 0;
s + = i;}
System.out.print (s);- 0
- 55
- 45
- Wrong command
-
- Question 6. After running the command block s =?
int s = 0;
for (int i = 0; i <= 10; i ++)
s + = i;- 45
- 55
- 56
- 0
-
- Question 7. If the program runs with the java message -g cruel world command, what is the value of the args [1] parameter?
public static void main (String [] args) {
if (args [0] .equals ('- g'))
System.out.print ('Goodbye,');
for (int i = 1; i
System.out.print ('' + args [i]); }- -g
- cruel
- world
- -g cruel world
-
- Question 8. If the program runs with the java message -g cruel world, what is the result?
public static void main (String [] args) {
if (args [0] .equals ('- g'))
System.out.print ('Goodbye,');
for (int i = 1; i
System.out.print ('' + args [i]); }- -g cruel world
- cruel world
- Goodbye, cruel world
- Goodbye cruel world
-
- Question 9. If initializing two class A objects extending KiemTra and class B extends KiemTra, the id of object A is valid:
class KiemTra {
private int i;
private int nextId;
public void setId () {
id = nextId;
nextId ++;
}
}- 0
- first
- 2
- Void
-
- Question 10. If initializing two class A objects, the KiemTra and class B extends extends KiemTra, the id of object B is valid?
class KiemTra {
private int i;
private int nextId;
public void setId () {
id = nextId;
nextId ++;
}
}- 0
- first
- 3
- Void
-
3.2 ★ | 5 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.