View Single Post
  #1  
Old 02-25-2007, 02:14 AM
godofwarares godofwarares is offline
Webmaster
godofwarares's Avatar
Join Date: Dec 2006
Location: Florida
Posts: 552
godofwarares is on a distinguished road
Send a message via ICQ to godofwarares Send a message via AIM to godofwarares Send a message via MSN to godofwarares Send a message via Yahoo to godofwarares
Support for various operations

I've always wondered why these 5 words were highlighted in my code when they do nothing:

PHP Code:
import
extends
class
package
implements 
I know they can be used in Java, somewhat like this:

PHP Code:
package myPack;

import myPack.oneClass;
import myPack.anotherClass;

public class 
Whatever extends This implements That
{
     
oneClass.go();
} 
Is there to be any support for these commands in the future?


Definitions for each commands

Package
The package command in Java imports a folder that contains classes, example: myPack.thisClass in the folder would be myPack/thisClass.

Import
Same as this.join, except it imports only the functions and not the variables (except for integers, such as CLOSE_ON_HIDE, on that line)

Extends
This is virtually the same as this.join.

Class
Self-Explanitory. This just defines the file as a class, and you can put many of these in a file to specify more than one class. E.g.:

PHP Code:
public class this
{
     
// Some code
}

public class 
this_whatever
{
     
// Some code

} 
This can be useful if you don't want to spam your class list.

Implements
About the same as import, but all variables are imported into the current class.





Any ideas/comments?
* NO FLAMING OR WHATEVER! *
__________________
What signature? I see no signature?
Reply With Quote