Quiz Discussion

What will be the output of the following Java program?

    class comma_operator 
    {
        public static void main(String args[]) 
        {    
             int sum = 0;
             for (int i = 0, j = 0; i < 5 & j < 5; ++i, j = i + 1)
                 sum += i;
 	     System.out.println(sum);
        } 
    }

 

Course Name: Java

  • 1]

    5

  • 2]

    6

  • 3]

    14

  • 4]

    compilation error

Solution
No Solution Present Yet

Top 5 Similar Quiz - Based On AI&ML

Quiz Recommendation System API Link - https://fresherbell-quiz-api.herokuapp.com/fresherbell_quiz_api

# Quiz
No Data Available
# Quiz