Skip to content

Commit 2cee39e

Browse files
authored
Add files via upload
1 parent f5ab837 commit 2cee39e

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

Diff for: Methods/ReturningValues2.java

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
class Test
2+
{
3+
int a;
4+
int b;
5+
int c;
6+
Test(int i,int j,int k)
7+
{
8+
a=i;
9+
b=j;
10+
c=k;
11+
}
12+
}
13+
public class ReturningValues2 {
14+
static Test getValues()
15+
{
16+
return new Test(10,20,50);
17+
}
18+
public static void main(String[] args) {
19+
getValues();
20+
System.out.println("a="+getValues().a);
21+
System.out.println("b=" + getValues().b);
22+
System.out.println("c="+getValues().c);
23+
}
24+
}

0 commit comments

Comments
 (0)