From 0754c5105bc4ceb42289ae86cb87e165137fad3b Mon Sep 17 00:00:00 2001 From: david Date: Thu, 6 Jan 2011 23:21:20 +0000 Subject: [PATCH] *** empty log message *** --- Robust/src/Tests/InitializerTest.java | 40 +++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Robust/src/Tests/InitializerTest.java diff --git a/Robust/src/Tests/InitializerTest.java b/Robust/src/Tests/InitializerTest.java new file mode 100644 index 00000000..ba90f388 --- /dev/null +++ b/Robust/src/Tests/InitializerTest.java @@ -0,0 +1,40 @@ +public class Test{ + static public void main(String[] args){ + int mainInt = 10; + Foo f1=new Foo(); + Foo f2=new Foo(3); + f1.print(); + f2.print(); + } +} + +class Foo{ + private int a=1; + private double b=5; + private byte c=(byte)10; + private short d=(short)7; + private long e=15; + private float f=6; + private boolean g=true; + private char h='h'; + + public Foo(int alpha){ + a=alpha; + } + + public Foo(){ + + } + + public void print() { + System.out.println("a="+a); + System.out.println("b="+b); + System.out.println("c="+c); + System.out.println("d="+d); + System.out.println("e="+e); + System.out.println("f="+f); + System.out.println("g="+g); + System.out.println("h="+h); + } + +} -- 2.34.1