Podcast
Questions and Answers
What is a class in Java?
What is a class in Java?
- A new data type for creating objects (correct)
- An instance variable storing data
- A template for an object
- A method for representing behavior
How is an object related to a class?
How is an object related to a class?
- An object is a new data type in Java
- An object is an instance of a class (correct)
- An object represents behavior in Java
- An object is a template for a class
What do instance variables in a class represent?
What do instance variables in a class represent?
- New data types in Java
- Data stored by the objects of the class (correct)
- Object's behavior
- Methods of the class
Which statement best describes a class in Java?
Which statement best describes a class in Java?
In Java, what do methods in a class represent?
In Java, what do methods in a class represent?