View Single Post
  #11 (permalink)  
Old 01-22-2008, 04:34 AM
hardwired hardwired is offline
Senior Member
 
Join Date: Jul 2007
Posts: 1,222
hardwired is on a distinguished road
Code:
public class Test { static String status; static int speed; static float Temperature; public static void main(String[] args) { Temperature = 250; checkTemperature(); showAttributes(); } static void checkTemperature() { if (Temperature > 660) { status = "returning home"; speed = 5; } } static void showAttributes() { System.out.println("Status: " + status); System.out.println("Speed: " + speed); System.out.println("Temperature: " + Temperature); } }
Reply With Quote