Instance Variables

Instance Variables

Instance variable is basically a signifies inside the class but in the outside of any method and its initialized when class is initialized. its mainly a field which is belongs to the unique object.This is following in the code.:

class Employee {
// define fields (instance variables) for employee instances
private String name;
private String title,
private String manager;
// other code goes here including access methods for private fields
}

By:UMANG
Date:2025-02-09 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related Java Subjective Links

Java Subjective interview questions and answers for experienced and fresher