This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes struct in java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic

struct in java

vijayapriya thirumurugan

Joined: Apr 03, 2009
Posts: 16

hello sir,

i have seen that struct concept is there in java.

it's syntax is:

static class teststruc extends Struct{
String name;
int number;

but i didn't have clear idea about this. that's why i asked. but sir, i'll tell my concept using c language. can you clear that in java.

i have struct in c which contains a field which is of array i.e.,

struct test{
int array;

here i am accessing by means of for loop;
i am storing 1 to b[1][1] .array and 2 to b[1][2], etc again 1 to b[2][1].array etc.
can you give this idea in java

Henry Wong

Joined: Sep 28, 2004
Posts: 20376

Please reply to topics -- instead of starting new topics -- when replying.... Here is you original topic...


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
I agree. Here's the link:
subject: struct in java
It's not a secret anymore!