/trunk/Examples/perl5/java/Example.java
Java | 29 lines | 21 code | 8 blank | 0 comment | 0 complexity | e0e20a5df5a205e4aba76926eb867eb0 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
- public class Example {
- public int mPublicInt;
-
- public Example() {
- mPublicInt = 0;
- }
-
- public Example(int IntVal) {
- mPublicInt = IntVal;
- }
-
-
- public int Add(int a, int b) {
- return (a+b);
- }
-
- public float Add(float a, float b) {
- return (a+b);
- }
-
- public String Add(String a, String b) {
- return (a+b);
- }
-
- public Example Add(Example a, Example b) {
- return new Example(a.mPublicInt + b.mPublicInt);
- }
- }