summaryrefslogtreecommitdiff
path: root/Examples/ruby/java/Example.java
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/ruby/java/Example.java')
-rw-r--r--Examples/ruby/java/Example.java29
1 files changed, 29 insertions, 0 deletions
diff --git a/Examples/ruby/java/Example.java b/Examples/ruby/java/Example.java
new file mode 100644
index 0000000..91ddb1a
--- /dev/null
+++ b/Examples/ruby/java/Example.java
@@ -0,0 +1,29 @@
+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);
+ }
+}
+