Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hey guys,

Is there any possibility to create a global struct in java?
I know there is something like this in C++ for creating a struct:

C#
struct some_struct{
int one;
int two;
int three;
};


But how can I do it in Java?


Greetings
Epanjohura
Posted
Updated 18-May-20 23:45pm

1 solution

Java hasn't structs, it has classes. See, for instance here[^].
Java hasn't global variables either, see, for instance, here[^].
 
Share this answer
 
Comments
epanjohura 23-Jan-12 9:43am    
thanks a lot
Sergey Alexandrovich Kryukov 23-Jan-12 20:30pm    
Oh gosh... a 5.
--SA
epanjohura 30-Jan-12 3:16am    
what?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900