How to Print Different Type of Values in Java or Displaying Information using print() and println() Methods or Using generic methods to print array of different types or Data types in Java Learn about integer character float double long etc or Returning Multiple values in Java or how to print different type of values in java. java program for printing an integer, float, string, character and boolean values in java. string printing in java.
Explanation:-
As we know that we have different types of variable in Java such as Integer character float double long string and boolean, now in this problem we have to print these different type of variable. We also know that each variable has a different type of printing pattern like when we have to print character we use single quotes ( ' ' )and for string, we use double quotes ( " " ).
Output:
123456789
235.254
P
true
Prashant
need an explanation for this answer? contact us directly to get an explanation for this answer