What will be the output of the following Java code? - Average
public class average {
public static void main(String args[])
{
double num[] = {5.5, 10.1, 11, 12.8, 56.9, 2.5};
double result;
result = 0;
for (int i = 0; i < 6; ++i)
{
result = result + num[i];
}
System.out.print(result/6);
}
}
16.34
16.566666644
16.46666666666667
16.46666666666666
Quiz Recommendation System API Link - https://fresherbell-quiz-api.herokuapp.com/fresherbell_quiz_api
# | Quiz |
---|---|
1
Discuss
|
Which of these literals can be contained in float data type variable?
Solution |
2
Discuss
|
Which of the following is the advantage of BigDecimal over double?
Solution |
3
Discuss
|
What is the output of below code snippet?
Solution |
4
Discuss
|
What is the numerical range of a char data type in Java?
Solution |
5
Discuss
|
What is the output of this program?
Solution |
6
Discuss
|
What is the numerical range of a char data type in Java?Which of these coding types is used for data type characters in Java?
Solution |
7
Discuss
|
Which one is a valid declaration of a boolean?
Solution |
8
Discuss
|
What will be the output of the following Java code? - Area Of Circle
Solution |
9
Discuss
|
What is the base of BigDecimal data type?
Solution |
10
Discuss
|
What is the range of short data type in Java?
Solution |
# | Quiz |
Copyright © 2020 Inovatik - All rights reserved