Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

variables in java

class Variables {
    public static void main(String[] args) {
        String msg = "Hello World"; // Strings
        int number = 10; // Integers
        float decimal = 7.369f; // Make sure to end the decimal with an f.
        char letter = 'A'; // Characters
        boolean result = true; // Booleans
    }
}
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #variables #java
ADD COMMENT
Topic
Name
2+3 =