User Name
Remember Me?
Password
Register
FAQ
Social Groups
Calendar
Search
Today's Posts
Mark Forums Read
Java Forums
»
General Java
»
New To Java
»
Structs Question
LinkBack
Thread Tools
Display Modes
#
1
(
permalink
)
10-12-2008, 09:51 PM
thagentleman
Member
Join Date: Oct 2008
Posts: 7
Rep Power:
0
Structs Question
Does anyone know how to initialize and declare variables using structs??
Thanks in advance
#
2
(
permalink
)
10-12-2008, 10:03 PM
Fubarable
Moderator
Join Date: Jun 2008
Posts: 6,431
Rep Power:
8
Are we talking C++ or are we talking Java here??
#
3
(
permalink
)
10-12-2008, 10:05 PM
thagentleman
Member
Join Date: Oct 2008
Posts: 7
Rep Power:
0
preferably Java.
#
4
(
permalink
)
10-12-2008, 10:08 PM
Paul Richards
Member
Join Date: Oct 2008
Location: UK
Posts: 48
Rep Power:
0
Java does not have structs, so you use classes instead.
#
5
(
permalink
)
10-12-2008, 10:09 PM
Fubarable
Moderator
Join Date: Jun 2008
Posts: 6,431
Rep Power:
8
Well then of course you know that Java doesn't have structs. So the short answer is "you can't". The long answer will depend on you restating your question in greater detail mainly concentrating on what your ultimate goal with the code is.
#
6
(
permalink
)
10-12-2008, 10:18 PM
CJSLMAN
Moderator
Join Date: Oct 2008
Location: Mexico
Posts: 1,159
Rep Power:
3
No pointers, struct, or union in Java
As far as I know, struct don't exist in Java. Found the following which might help (shows struct equivalent using classes):
C Data Types Not Supported By the Java Language
__________________
Chris S.
Difficult? This is Mission Impossible, not Mission Difficult. Difficult should be easy.
Last edited by CJSLMAN; 10-12-2008 at
10:36 PM
.
Bookmarks
Digg
del.icio.us
StumbleUpon
Google
«
CompSci 1 Novice, need some help
|
I need a back and forward code
»
Thread Tools
Show Printable Version
Email this Page
Display Modes
Linear Mode
Switch to Hybrid Mode
Switch to Threaded Mode
Posting Rules
You
may not
post new threads
You
may not
post replies
You
may not
post attachments
You
may not
edit your posts
BB code
is
On
Smilies
are
On
[IMG]
code is
On
HTML code is
Off
Trackbacks
are
On
Pingbacks
are
On
Refbacks
are
On
Forum Rules
Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Question mark colon operator question
orchid
Advanced Java
8
11-27-2008
07:36 AM
question
zizou147
New To Java
13
07-04-2008
08:05 PM
question on jsp
munigantipraveen
JavaServer Pages (JSP) and JSTL
2
06-30-2008
03:47 PM
Need help on this question
Deon
New To Java
3
01-27-2008
04:58 PM
question about rmi
leonard
New To Java
1
08-06-2007
05:19 AM
All times are GMT +2. The time now is
11:01 AM
.
Java Tips
|
Linux Archive
Contact Us
-
Java Forums
-
Sitemap
-
Top
VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org
LinkBack
LinkBack URL
About LinkBacks
Bookmark & Share
Bookmark in Technorati