[go: up one dir, main page]

0% found this document useful (0 votes)
28 views1 page

Java Code

The document contains a simple Java program named Hello1 that defines a main method. It initializes variables for a name, a character, and two integers, then calculates their sum. Finally, it prints the values of the variables and the result of the addition to the console.

Uploaded by

nagendra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views1 page

Java Code

The document contains a simple Java program named Hello1 that defines a main method. It initializes variables for a name, a character, and two integers, then calculates their sum. Finally, it prints the values of the variables and the result of the addition to the console.

Uploaded by

nagendra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

[12:27 PM] Sandhya Singh

public class Hello1 {

public static void main(String[] args) {


// TODO Auto-generated method stub
String name ="John";
char alph ='A';
int numFirst = 5;
int numSecond = 6;
int Result = numFirst + numSecond;
System.out.println("Name: "+ name);
System.out.println("Alphabet: "+ alph);
System.out.println("numFirst: "+ numFirst);
System.out.println("numSecond: "+ numSecond);
System.out.println("============================");
System.out.println("Result : "+ Result);

}
}

You might also like