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
|
What is the base of BigDecimal data type?
Solution |
|
2
Discuss
|
What is the output of below code snippet?
Solution |
|
3
Discuss
|
Which of the following is the advantage of BigDecimal over double?
Solution |
|
4
Discuss
|
Which of the below data type doesn’t support overloaded methods for +,-,* and /?
Solution |
|
5
Discuss
|
What is the output of this program?
Solution |
|
6
Discuss
|
What is the output of this program?
Solution |
|
7
Discuss
|
What will be the output of the following Java code? - Area Of Circle
Solution |
|
8
Discuss
|
Which data type value is returned by all transcendental math functions?
Solution |
|
9
Discuss
|
Which one is a valid declaration of a boolean?
Solution |
|
10
Discuss
|
What is the range of byte data type in Java?
Solution |
| # | Quiz |
Copyright © 2020 Inovatik - All rights reserved