Adding 2 value Using Java

Adding 2 value Using Java

Just open your Java compiler Paste this code.

package javaapplication13;

/**
 *
 * @author Xaiver
 */

public class JavaApplication13 {

    /**
     * @param args the command line arguments
     */
   
    import java.util.Scanner;
    public static void main(String[] args) {
         Scanner input = new Scanner(System.in);
    }
        // TODO code application logic here
         public static void hstal(){
        int a;
        System.out.println("enter the first number");
        int b;
        System.out.println("enter the second number");
        int v=a+b;
               
         System.out.println(v);
        hstal();
    }
   

}

0 comments: