Classes and objects in Java — Flashcards
Gujarat Board · Class 12 · Computer Studies
35 flashcards for Classes and objects in Java (Gujarat Board Class 12 Computer Studies) to test yourself on key terms and facts.
Interactive on Super Tutor
Studying Classes and objects in Java? Get the full interactive chapter.
Quizzes, flashcards, AI doubt-solver and a step-by-step study plan — built for flashcards and more.
Free trial, no card needed.
What is a class in Java?
Answer
A class is a template for multiple objects with similar features. It contains data called attributes and program code called methods. For example, Room is a class for rooms with common properties like…
What is an object in Java?
Answer
An object is an instance of a class. It is the concrete form of a class, created in memory and holding its own data values. For example, a Room object stores its own length, width, height, and number …
How do you create an object in Java?
Answer
Creating an object has three steps: declaration, instantiation, and initialization. First, declare a reference variable such as Room r1; then create the object using new, such as r1 = new Room();. The…
Why does Room r1; not create an object?
Answer
Room r1; only declares a reference variable. It does not allocate memory for an object, so r1 is null by default until new Room() creates the object. Trying to use r1.length or r1.display() before ins…
What does the new operator do in Java?
Answer
The new operator allocates memory for an object and returns the address of the object for later use. That address is stored in a reference variable. Objects live in the heap, and unused objects are la…
What is the difference between a class and an instance?
Answer
A class is an abstract representation of an object, while an instance is its concrete representation. A class is the template; an instance is the actual object created from it. A Room class describes …
What is a reference in Java?
Answer
A reference is the address of the memory location where an object is stored. A class-type variable stores only this reference, not the object itself. That is why a variable like Room r1 can point to a…
What are instance variables?
Answer
Instance variables are variables defined inside a class but outside methods. They are created when an object is created and stay throughout the life of that object. Each object has its own copy, so di…
+27 more flashcards
Practise AllFrequently Asked Questions
What are the important topics in Classes and objects in Java for Gujarat Board Class 12 Computer Studies?
How many flashcards are available for Classes and objects in Java?
Sources & Official References
Content is aligned to the official syllabus. Refer to the board website for the latest curriculum.
More resources for Classes and objects in Java
For serious students
Get the full Classes and objects in Java chapter — start free.
Quizzes, flashcards, an AI doubt solver and a study plan for Gujarat Board Class 12 Computer Studies. Free to start, no card needed.