PageRenderTime 50ms CodeModel.GetById 47ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/ruby/java/Example.java

#
Java | 29 lines | 21 code | 8 blank | 0 comment | 0 complexity | e0e20a5df5a205e4aba76926eb867eb0 MD5 | raw file
 1public class Example {
 2    public   int      mPublicInt;
 3    
 4    public Example() {
 5	mPublicInt = 0;
 6    }
 7    
 8    public Example(int IntVal) {
 9	mPublicInt = IntVal;
10    }
11    
12    
13    public int Add(int a, int b) {
14	return (a+b);
15    }
16    
17    public float Add(float a, float b) {
18	return (a+b);
19    }
20    
21    public String Add(String a, String b) {
22	return (a+b);
23    }
24    
25    public Example Add(Example a, Example b) {
26	return new Example(a.mPublicInt + b.mPublicInt);
27    }
28}
29