gs gs128 Java Classes Methods - Java Method - Quiz No.1
gs gs128 Java Quiz
This quiz belongs to book/course code gs gs128 Java of gs organization. We have 136 quizzes available related to the book/course Java. This quiz has a total of 10 multiple choice questions (MCQs) to prepare and belongs to topic Java Classes Methods. NVAEducation wants its users to help them learn in an easy way. For that purpose, you are free to prepare online MCQs and quizzes.
NVAEducation also facilitates users to contribute in online competitions with other students to make a challenging situation to learn in a creative way. You can create one to one, and group competition on an topic of a book/course code. Also on NVAEducation you can get certifications by passing the online quiz test.
Question 1: What is the return type of a method that does not return any value?
int
float
void
double
Question 2: What is the process of defining more than one method in a class differentiated by method signature?
Function overriding
Function overloading
Function doubling
None of the mentioned
Question 3: Which of the following is a method having same name as that of it’s class?
finalize
delete
class
constructor
Question 4: Which method can be defined only once in a program?
main method
finalize method
static method
private method
Question 5: Which of this statement is incorrect?
All object of a class are allotted memory for the all the variables defined in the class
If a function is defined public it can be accessed by object of other class by inheritation
main() method must be made public
All object of a class are allotted memory for the methods defined in the class
Question 9: In the following Java code, which call to sum() method is appropriate?
class Output { public static int sum(int ...x) { int total; // ...do the sum... return total; } static void main(String args[]) { sum(10); sum(10,20); sum(10,20,30); sum(10,20,30,40); } }
only sum(10)
only sum(10,20)
only sum(10) & sum(10,20)
all of the mentioned