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

Variable Samples

This Java code defines variables of different types - a boolean, char, and double - within the main method. A boolean variable named result is declared but not initialized. A char variable called option is declared and initialized to 'C'. A double called grade is declared and initialized to 0.0.

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)
5 views1 page

Variable Samples

This Java code defines variables of different types - a boolean, char, and double - within the main method. A boolean variable named result is declared but not initialized. A char variable called option is declared and initialized to 'C'. A double called grade is declared and initialized to 0.0.

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

public class VariableSamples {

public static void main( String[] args ){

boolean result;

char option;
option = 'C';

double grade = 0.0;


}
}

You might also like