Video: ClickMe
More details about InstanceVariablesInJava.java
package com.variables.tutorialbyexample;
public class InstanceVariablesInJava {
// Declared and instantiated with 100 value
// This is also called as filed.
private int iInstanceVariables = 100;
public InstanceVariablesInJava() {
// TODO Auto-generated constructor stub
}
public static void main(String[] args) {
// Creating the new object of InstanceVariablesInJava class.
InstanceVariablesInJava objInstanceVariablesInJava =
new InstanceVariablesInJava();
System.out.println("Output of iInstanceVariables = " +
objInstanceVariablesInJava.iInstanceVariables);
// System.out.println("Compile time error " iInstanceVariables);
}
}
Please like and share it!!!
No comments:
Post a Comment