One of the most common tasks you need to accomplish in Java is to convert information from one form into another. Several types of conversions you can do include
When a method such as
System.out.println() requires a string argument, you can use the
+ operator to combine several different types of information in that argument. As long as one of the things being combined is a string, the combined argument is converted into a string.
• Converting an object into another object
• Converting a simple variable into another type of variable
• Using an object to create a simple variable
• Using a simple variable to create an object
Simple variables are the basic data types you learned about during Hour 5 ...