You have an enum class Signal that represents the state of a network connection. You want to print the position number of the SENDING enum. Which line of code does that?

Question:You have an enum class Signal that represents the state of a network connection. You want to print the position number of the SENDING enum. Which line of code does that?

1.Enum class Signal { OPEN, CLOSED, SENDING }

2.Println(Signal.SENDING.position())

3.Println(Signal.SENDING.hashCode()

4.Println(Signal.SENDING.ordinal)


Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!