Question: public class TaskLiterals { public static void main ( String [ ] args ) { 1 3 ? / / What's the default data type

public class TaskLiterals {
public static void main(String[] args){
13?
// What's the default data type of
// data type is:
System.out.println(13);
// why the following statements is
wrong?
// please give the reason and fix it.
1**
reasons:
/
// System.out.println(3_111_111_111);
13L?
// What's the default data type of
// data type is:
System.out.println(1333234234123412L);
true and false?
// What's the default data type of // data type is:
System.out.println(true);
System.out.println(false);
1.3?
// What's the default data type of
// data type is:
System.out.println(1.3);
1.3f?
// What's the default data type of
// data type is:
System.out.println(1.3f);
1.3d?
// What's the default data type of
// data type is:
System.out.println(1.3d);
System.out.println(1.3D);
// Do 1.3,1.3d,1.3D have the same default data type?
// Answer:
System.out.println(1.3);
System.out.println(1.3d);
System.out.println(1.3D);
Please solve code and explain why errors were made and how to fix
 public class TaskLiterals { public static void main(String[] args){ 13? //

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!