0% found this document useful (0 votes)
20 views

Output Variable

This Java program defines a main method that declares an integer variable set to 10 and a character variable set to 'A'. It then prints the value variable to the console, followed by a message string concatenated with the x variable to display the value of x.

Uploaded by

_piAh_
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

Output Variable

This Java program defines a main method that declares an integer variable set to 10 and a character variable set to 'A'. It then prints the value variable to the console, followed by a message string concatenated with the x variable to display the value of x.

Uploaded by

_piAh_
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, TXT or read online on Scribd
You are on page 1/ 1

public class OutputVariable {

public static void main( String [] args){


int value=10;
char x;
x='A';

System.out.println(value);
System.out.println("the value of x=" +x);
}
}

You might also like