Java Reference
In-Depth Information
{
System.out.println("[instance] double2 = "+double2);
System.out.println("[instance] int2 = "+int2);
System.out.println("[instance] string2 = "+string2);
System.out.println();
}
static
{
double1 = 1.0;
int1 = 1000000000;
string1 = "abc";
}
{
double2 = 1.0;
int2 = 1000000000;
string2 = "abc";
}
InitDemo()
{
System.out.println("InitDemo() called");
System.out.println();
}
static double double3 = 10.0;
double double4 = 10.0;
static
{
System.out.println("[class] double3 = "+double3);
System.out.println();
}
{
System.out.println("[instance] double4 = "+double3);
System.out.println();
}
public static void main(String[] args)
{
System.out.println ("main() started");
Search WWH ::




Custom Search