Prepare
Practice
Interview
Aptitude
Reasoning
English
GD
Placement papers
HR
Current affairs
Engineering
MCA
MBA
Online test
Login
Online Practice Test
>
Java Part 2
« Previous
Next »
What are field variables?
Options
- Variable declared within a method
- Variable declared outside a constructor but inside a class
- Both b and d
- Variable that is declared as a member of a class
CORRECT ANSWER : Both b and d
Discussion Board
Field Variables
Field variable is also known as instance variable as it is defined in the class as a member variable for each object of the class. They al have separate copy or instances of the class. It is quite different from the class variable and it is not defined using the Static variable declaration modifier as per the class variable.
The instance variable is declared in the class, and may be given a default value. Instance variables store the current value of the objects which class don't know about. All instances have their own copy of variables and other required values.
Rohit Sharma 08-9-2014 08:19 PM
« Previous
Next »
Write your comments
*
*
Email must be in the form someone@domain.com
*
*
Enter the code shown above:
Please enter the code shown above
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)
Related Content
Java Beginner (11)
Java (39)
Java (40)
Java (22)
Java (30)
Java (25)
Java (20)
Java (20)
Core Java (20)
Core Java (10)
Core Java (72)
EJB (20)
JDBC (20)
Applet (20)
Struts (21)
Servlets (20)
Java Web Services (20)
Javascript (40)
J2EE (10)
jQuery (46)
Advertisement
▲