
-----------------------------------
SilverSprite
Thu Jul 10, 2003 10:24 pm

Type
-----------------------------------
How do i define my own type in java?

-----------------------------------
rizzix
Fri Jul 11, 2003 8:47 am


-----------------------------------
what do u mean by defining your own type...?

-----------------------------------
SilverSprite
Fri Jul 11, 2003 11:51 am


-----------------------------------
hm in c++ its typedef.. also whast the equivalent to a c++ structure in java anad how is it used?

-----------------------------------
rizzix
Fri Jul 11, 2003 3:44 pm


-----------------------------------
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
Fri Jul 11, 2003 8:32 pm


-----------------------------------
oh ic.. oh well thx..
