Vocabulary

1public class Testing {
2   public static void main(String args[]) {
3        System.out.println(getThing());
4    }
5    public static String getThing() {
6        return "thing";
7    }
8}
 
From the above code, which of the following is accomplished by line 1?
Defining a class
Defining a method
Instantiating a class
Instantiating a method
Defining a variable
Instantiating a variable
1public class Testing {
2   public static void main(String args[]) {
3        System.out.println(getThing());
4    }
5    public static String getThing() {
6        return "thing";
7    }
8}
 
From the above code, which of the following is accomplished by line 5?
Defining a class
Defining a method
Instantiating a class
Instantiating a method
Defining a variable
Instantiating a variable
1public class Testing {
2   public static void main(String args[]) {
3        System.out.println(getThing());
4    }
5    public static String getThing() {
6        return "thing";
7    }
8}
 
From the above code, which of the following is the return type from the method getThing()?
Nothing
Integer
Double
Boolean
Class
Method
Short
String
1public class Testing {
2   public static void main(String args[]) {
3        System.out.println(getThing());
4    }
5    public static String getThing() {
6        return "thing";
7    }
8}
 
From the above code, which of the following is the return type of the method main()?
Nothing
Integer
Double
Boolean
Class
Method
Short
String
Args[]
1public class Testing {
2   public static void main(String args[]) {
3        System.out.println(getThing());
4    }
5    public static String getThing() {
6        return "thing";
7    }
8}
 
From the above code, which of the following is the parameter type of the method getThing()?
Nothing
Integer
Double
Boolean
Class
Method
Short
String
1public class Testing {
2   public static void main(String args[]) {
3        System.out.println(getThing());
4    }
5    public static String getThing() {
6        return "thing";
7    }
8}
 
From the above code, which of the following is the parameter type of the method main()?
Void
Nothing
A String of arguments
Void[]
Static
An array of Strings
Public
Main
1public class Testing {
2   public static void main(String args[]) {
3        System.out.println(getThing());
4    }
5    public static String getThing() {
6        return "thing";
7    }
8}
 
From the above code, which of the following will be the output of the program?
GetThing()
"thing";
"thing"
Return "thing";
Thing
There will not be any output
There would be an error
1public class Testing {
2   public static void main(String args[]) {
3        System.out.println(getThing());
4    }
5    public static String getThing() {
6        return "thing";
7    }
8}
 
From the above code, which of the following would be the output of the program if the parameters "hi", "hello" were given in an array as parameters to main?
Hi
Hello
Hi, hello
Hihello
Hi hello
Thing
There would be an error
1public class Testing {
2   public static void main(String args[]) {
3        System.out.println(getThing());
4    }
5    public static String getThing() {
6        return "thing";
7    }
8}
 
From the above code, which of the following would getThing() return if the parameter "keyword" is passed in as a parameter?
Keywordthing
Keywordthings
Thingkeyword
There would be an error
Thing
Keyword
1public class Testing {
2   public static void main(String args[]) {
3        System.out.println(getThing());
4    }
5    public static String getThing() {
6        return "thing";
7    }
8}
 
From the above code, which of the following is accomplished by line 3?
The program will print to the local printer the value of getThing()
The program will print out the value of getThing()
It doesn't serve any real purpose
It has to be there for the program to run
{"name":"Vocabulary", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"1public class Testing { 2   public static void main(String args[]) { 3        System.out.println(getThing()); 4    } 5    public static String getThing() { 6        return \"thing\"; 7    } 8}   From the above code, which of the following is accomplished by line 1?, 1public class Testing { 2   public static void main(String args[]) { 3        System.out.println(getThing()); 4    } 5    public static String getThing() { 6        return \"thing\"; 7    } 8}   From the above code, which of the following is accomplished by line 5?, 1public class Testing { 2   public static void main(String args[]) { 3        System.out.println(getThing()); 4    } 5    public static String getThing() { 6        return \"thing\"; 7    } 8}   From the above code, which of the following is the return type from the method getThing()?","img":"https://www.quiz-maker.com/3012/images/ogquiz.png"}
Powered by: Quiz Maker