Skip to content

Commit 4fb3ffe

Browse files
authored
Add files via upload
1 parent 85381c0 commit 4fb3ffe

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

Diff for: Methods/ReturningValues3.java

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import java.util.*;
2+
class Test
3+
{
4+
List<Object> getValues()
5+
{
6+
String name="Disha";
7+
int rno=75;
8+
int height=5;
9+
return Arrays.asList(name,rno,height);
10+
}
11+
}
12+
public class ReturningValues3 {
13+
public static void main(String[] args) {
14+
15+
Test obj=new Test();
16+
List<Object> person= obj.getValues();
17+
System.out.println("Name:"+person.get(0));
18+
System.out.println("Roll Number:" + person.get(1));
19+
System.out.println("Height:" + person.get(2));
20+
21+
}
22+
23+
24+
}

0 commit comments

Comments
 (0)