We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 85381c0 commit 4fb3ffeCopy full SHA for 4fb3ffe
Methods/ReturningValues3.java
@@ -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