Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Help!
Index -> Programming, Java -> Java Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
sh4dow




PostPosted: Sat Mar 28, 2009 3:27 pm   Post subject: Help!

Hi guys, can you explain to me what the following codes do. In case you're wondering, I am planing on using this for ym calculator . Thank You for your help.

import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

And

String cmd = evt.getActionCommand();
if ('0' <= cmd.charAt(0) && cmd.charAt(0) <= '9' || cmd.equals(".")) {
Sponsor
Sponsor
Sponsor
sponsor
DemonWasp




PostPosted: Sat Mar 28, 2009 7:15 pm   Post subject: RE:Help!

The import directive tells the JVM what classes it should include for use. In this case, you're including something called WindowAdapter and WindowEvent from the AWT framework.

To figure out the second command, all you should need to know is some basic programming, and that:

&& means "boolean and" - returns true if and only if the thing to the left and the thing to the right are BOTH true
|| means "boolean or" - returns true if and only if either of the thing to the left and the thing to the right are true, or both.

You should also know about http://java.sun.com/javase/6/docs/api/
sh4dow




PostPosted: Sat Mar 28, 2009 9:11 pm   Post subject: RE:Help!

Thank You very much Demon Wasp Razz.
Display posts from previous:   
   Index -> Programming, Java -> Java Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: