Podcast
Questions and Answers
Which of the following is true about Java's method overloading?
Which of the following is true about Java's method overloading?
- It allows a class to have methods with the same name and parameters
- It allows a class to have only one method with a unique name and parameters
- It allows a class to have multiple methods with the same name but different parameters (correct)
- It allows a class to have multiple methods with different names but the same parameters
What does the 'static' keyword signify in Java?
What does the 'static' keyword signify in Java?
- It is used to create multiple instances of a class
- It indicates that a variable is not modifiable
- It belongs to the class and not to the instances of the class (correct)
- It is used to define a method that can be accessed from outside the class
What is the purpose of the 'transient' keyword in Java?
What is the purpose of the 'transient' keyword in Java?
- It specifies that a variable is not part of the persistent state of an object (correct)
- It is used to create multiple instances of a class
- It indicates that a variable is not modifiable
- It is used to define a method that can be accessed from outside the class