Calender - String name ="Joe Lion" declare and...

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

View Full Document Right Arrow Icon
// ****************************************** // Example1 // written by Cannon // // ******************************************* public class Example1 { public static void main(String[] args) { int a=4; // declare a as an int and intitialize it int b=3; // declare b as an int and intitialize it double otherGuy = a; // we can assign an integer to a double
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: String name = "Joe Lion"; // declare and initialize name double c = ((double)a)/b; // do integer division // print the results System.out.println("Hey, " + name + ", c is " + c); } // end of the main method }// end of the class...
View Full Document

This note was uploaded on 03/04/2010 for the course CHEM 1404 taught by Professor Luarakaufman/rubengonzalez during the Spring '09 term at Columbia.

Ask a homework question - tutors are online