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 :: how to get float value in json java 
Java :: creating modulu function withou using % java 
Java :: how to find the angle of 2 coordinates java 
Java :: hashtable contains key java 
Java :: How to efficiently find the index of smallest value that is larger than some target within a sorted array, in Java? 
Java :: java delete files 
Java :: anagram java program 
Java :: Java @Inherited 
Java :: find shortest string in array java 
Java :: how to make a char uppercase in java 
Java :: how to get only current date in java android studio 
Java :: change java version maven 
Java :: how to the text of an element in selenium java 
Java :: reverse sentence in java 
Java :: java queue 
Java :: create file from byte array java 
Java :: convert datetime to custom format in java 8 
Java :: slice array java 
Java :: java alert box 
Java :: java parallel sort 
Java :: Java program to find the sum of first 100 numbers 
Java :: android studio set text of textview 
Java :: expected exception junit 
Java :: convert list of integer to array in java 
Java :: @data lombok 
Java :: get absolute path from relative java 
Java :: how to catch enter key in java text field 
Java :: SendKeys issues with numbers(Int) 
Java :: split every character in string into array java 
Java :: in place transpose in a matrix in java 
ADD CONTENT
Topic
Content
Source link
Name
3+8 =