Chapter 2 Labs

Chapter 2 Labs - // Concatenates and adds two numbers and...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
//******************************************************************** // Addition.java Author: Lewis/Loftus // // Demonstrates the difference between the addition and string // concatenation operators. //******************************************************************** / public class Addition { //-----------------------------------------------------------------
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: // Concatenates and adds two numbers and prints the results. //-----------------------------------------------------------------public static void main (String args) { System.out.println ("24 and 45 concatenated: " + 24 + 45); System.out.println ("24 and 45 added: " + (24 + 45)); } }...
View Full Document

This document was uploaded on 02/21/2011.

Ask a homework question - tutors are online