Video: ClickMe
LocalVariableInJava.java
package com.variables.tutorialbyexample;
public class LocalVariableInJava {
public LocalVariableInJava() {
// TODO Auto-generated constructor stub
}
public static void print() {
int a = 50, b = 55, c = a + b;
System.out.println("Output of print() method variable a = " +
a + ", b = " + b + " and c =" + c);
}
public static void main(String[] args) {
// Local Variables
int a = 10;
int b = 20;
int c = a + b;
System.out.println("Output of main() method variable a = " +
a + ", b = " + b + " and c =" + c);
//Calling the static print method
print();
}
}
Please like and share it!!!
I wanted to thank for sharing this article and I have bookmarked this page to check out new stuff.
ReplyDeleteAWS Training in Chennai
AWS Training institute in Chennai
Best AWS Training in Chennai
VMware Training in Chennai
VMware course in Chennai
Azure Training in Chennai
Microsoft Azure Training in Chennai
DevOps Training in Anna Nagar