Ask your own question, for FREE!
Computer Science 20 Online
OpenStudy (anonymous):

What is a literal in Java?

OpenStudy (anonymous):

The literal is a value that can be written directly to a data type . Example : String s = new String ("Hello"); // It's not a literal String s = "Hello"; // It's a literal that means you don't call the Constructor of the Class to define an object. The literals can be applied to any data type : integer , float , double , boolean , String. Float Example: Float num = new Float (4); // It's not a literal Float num = 4f; // It's a literal I think it's simple answer for literals and You can Google it to get the full answer

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!