aspose file tools*
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
JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic
Author

struct in java

vijayapriya thirumurugan
Greenhorn

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;
}
b[10][10];

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
author
Sheriff

Joined: Sep 28, 2004
Posts: 18829
    
  40

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

http://www.coderanch.com/t/443489/Java-General-beginner/java/struct-java

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: struct in java