+ 1

How to write a specification in the constructor Java?

Enum values in color are written in capital letters (BLACK, WHITE). It’s necessary to make a refinement to the class, so that in the console turn out “whitE”, “black”

12th Aug 2022, 6:04 PM
nadinchiksv
1 ответ
+ 1
// I hope this link helps you https://code.sololearn.com/ctzBXfgRTAZU String w = Color.WHITE.name(); System.out.println( w.toLowerCase().substring(0,w.length()-1) + w.substring(w.length()-1, w.length()) ); String b = Color.BLACK.name(); System.out.println(b.toLowerCase());
13th Aug 2022, 12:24 AM
SoloProg
SoloProg - avatar