Question
class output {
public static void main(String args[])
{
double a, b,c;
a = 4.0/0;
b = 0/3.0;
c=0/0.0;
System.out.println(a);
System.out.println(b);
System.out.println(c);
}
}
a.
Infinity
b.
0
c.
NaN
d.
all of the mentioned
Posted under Java Programming
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. What is the output of this program?
Similar Questions
Discover Related MCQs
Q. Which of the following are legal lines of Java code?
1. int w = (int)888.8;
2. byte x = (byte)100L;
3. long y = (byte)100;
4. byte z = (byte)100L;
View solution
Q. Which of these coding types is used for data type characters in Java?
View solution
Q. Java array is a collection of ________.
View solution
Q. Array data access using _____.
View solution
Q. At time of array initialization which is necessary to specify?
View solution
Q. Java Array can allocate __________.
View solution
Q. Which of the following is an incorrect array declaration?
View solution
Q. Index in array start with ______.
View solution
Q. Which of the following is used to declare,construct, and initlaize an array?
View solution
Q. We can calculate the length of an array using ________.
View solution
Q. Which of the following is advantage of java array?
View solution
Q. In java, array elements are stored in ________ memory locations.
View solution
Q. What does a Data Type in Java refers to?
View solution
Q. Choose the wrong statement about Java programming?
View solution
Q. Which data type among the following is an implementation of Objects or OOPs?
View solution
Q. What is a Primitive Data Type in Java?
View solution
Q. Which among the following is not a Data Type in Java?
View solution
Q. Which among the following is not a valid Data Type in Java?
View solution
Q. Which is the data type used mostly to handle streams and buffers in Java language?
View solution
Q. Which is the data type that is not recommended for numeric applications in Java?
View solution
Suggested Topics
Are you eager to expand your knowledge beyond Java Programming? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!