Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

adding 2 variable in java

public class sum{
	Public static void main(String args[]){
    	int x=5;
      	int y=10;
      	int sum= x+y;
      System.out.println("addition of x and y= "+sum);
    }
}
Comment

add two variables in Java

public class sum{
	Public static void main(String args[]){
    	int x=5;
      	int y=10;
      	int sum= x+y;
      System.out.println(sum);
    }
}
Comment

add two variables in java

public class Addition{
  	//simple addition method in Java
	public static void main(String args[]){
    	int x = 1; // initializing first variable with a value
      	int y = 3; // initializing second variable
      	
      	int sum = x + y; // new variable which is adding two variables x and y
      	
      	System.out.println( x + " + " + y + " = " + sum );
      	// printing the sum of variable on the console
    }
}
Comment

PREVIOUS NEXT
Code Example
Java :: online java code fixer 
Java :: abstract code in java 
Java :: activityViewModels 
Java :: how to output in java 
Java :: java comparing-two-csv-files-in-java 
Java :: anagram java 
Java :: binary to decimal java 
Java :: dockerfile for spring boot app 
Java :: java sort method 
Java :: spring convert page to list 
Java :: java double to float 
Java :: java bfs 
Java :: how to check duplicate string in java 
Java :: java for item in array 
Java :: and roid shape setCornerRadii 
Java :: what is constructor in java 
Java :: Implementation of LinkedHashMap Class in Java map 
Java :: java.lang.ClassNotFoundException: javax.servlet.jsp.jstl.core.Config 
Java :: How to get the nth Fibonacci number code in Java using recursion with memoization 
Java :: how to set java path in windows 10 
Java :: linked list vs array list vs vector 
Java :: how to run a java file in terminal 
Java :: how to disable text field java 
Java :: android java show hide keyboard in AndroidManifest 
Java :: mod 10e9+7 in java 
Java :: java set file folder permissions 
Java :: what is a cache-less reload 
Java :: 7877777777777777777777777 
Java :: jframe calculator 
Java :: multiple representations of the same entity are being merged 
ADD CONTENT
Topic
Content
Source link
Name
3+2 =