faq 2 dimensional array questions and answers in java
(1)
public class ArrayDemo {
public static void main(String[] args) {
double arr[3];
arr[0]=2.1;
arr[1]=3.1;
arr[2]=4.1;
System.out.println(arr[1]+arr[2]);
}
}
What will be the output of above java program?
(a)7.2
(b) Any number greater than 7.2
(
No comments:
Post a Comment