What is output? Item jar = new Item(); Item ball = new Item(); System.out.println(Item.count); public class Item{ public static int count = 1; public Item(){ count++; } } Group of answer choices 1 Error: syntax error 3 2

Relax

Respuesta :

Answer:

It's 3

Explanation:

now if you pay attention, you've assigned count as 1 in the beginning and you've asked the class to increase the count variable by 1

and when the program is compiled the code is going to count ball and Jar as numbers

mean jar.count is 2

and ball.count is 3

that's all