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

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




PostPosted: Thu Jul 10, 2003 10:24 pm   Post subject: Type

How do i define my own type in java?
Sponsor
Sponsor
Sponsor
sponsor
rizzix




PostPosted: Fri Jul 11, 2003 8:47 am   Post subject: (No subject)

what do u mean by defining your own type...?
SilverSprite




PostPosted: Fri Jul 11, 2003 11:51 am   Post subject: (No subject)

hm in c++ its typedef.. also whast the equivalent to a c++ structure in java anad how is it used?
rizzix




PostPosted: Fri Jul 11, 2003 3:44 pm   Post subject: (No subject)

k ... first all Objects are types.. there is no way to alias a new type of an existing type... this feature of c was removed in java since it was an un-ndecssary syntax.. and it let to trouble at time.. specially in very large projects

structs is actually a c thing carry over to c++..
java does not use structs..

but u can create something similar to a struct using interfaces.. althoug it is not rcomended..

these features were eliminated to make java completely oop.
SilverSprite




PostPosted: Fri Jul 11, 2003 8:32 pm   Post subject: (No subject)

oh ic.. oh well thx..
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  [ 5 Posts ]
Jump to:   


Style:  
Search: