Instance fields - English
Java Tutorials - English 38
-
1Getting started java Installation
-
2First Java Program
-
3Installing Eclipse
-
4Getting started Eclipse
-
5Hello World Program in Eclipse
-
6Errors and Debugging in Eclipse
-
7Programming features Eclipse
-
8Numerical Datatypes
-
9Arithmetic Operations
-
10Strings
-
11Primitive type conversions
-
12Relational Operations
-
13Logical Operations
-
14if else
-
15Nested if
-
16Switch Case
-
17while loop
-
18For Loop
-
19do while
-
20Introduction to Array
-
21Array Operations
-
22Creating class
-
23Creating object
-
Instance fields
-
25Methods
-
26Default constructor
-
27Parameterized constructors
-
28Using this keyword
-
29Non static block
-
30Constructor overloading
-
31Method overloading
-
32User Input
-
33Subclassing and Method Overriding
-
34Calling methods of the superclass
-
35Using final keyword
-
36Polymorphism
-
37Abstract Classes
-
38Java Interfaces
Outline:
Instance fields *Also known as non-static fields *Open the TestStudent class which we have created *Access the fields roll_number and name using dot operator *See the output *Initialize the field and see the output *Change the modifier of the fields to private *Debug the error that you get *Change the modifier to protected *Each object of a class will have unique values *Create two objects of the Student class