FileDocCategorySizeDatePackage
Dec2.javaAPI DocExample700Thu Sep 27 23:05:24 BST 2001None

Dec2

public class Dec2 extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)

    int a=5; // a simple 4 byte integer
    long b=98; // an 8 byte integer
    float f1 = -1.672f; // a real
    double f2 = 456.0; // double length real (default)
    char c = 'W"; // a character
    String s = "Testing"; // a string of characters
    
    //Now for the output
    System.out.println(a);
    System.out.println("The double is " + b);
    System.out.print("The floats are " + f1);
    System.out.println(" and " + f2);
    System.out.println("Here is the character: " + c);
    System.out.println("And the string is: " + s);