Accessing Fields in a Class in Java -


I apologize for the mistakes because this is my first post. This is a basic question, but whatever I have seen I can not understand. In the following Java code:

  public class RAPVAR_XDATA_TYPE {public class datacfg {public int datacfg_len; Public float dataf_val; } Public class numdata {public ent numdata_len; Public float numdata_val; } Public class strdata {public int strdata_len; Public string strdata_val; }}  

Why can not I get numdata_len in the following functions:

  RAPVAR_XDATA_TYPE.numdata.numdata_len = 1; RAPVAR_XDATA_TYPE rxt = new RAPVAR_XDATA_TYPE (); Rxt.numdata.numdata_len = 1;  

I have been trying to create a data structure to copy the same structure I did in C ++ some time ago.

You will need to make internal classes and static to work for them, but Before you do this, do not try to create C ++ structures with Java because it is not a Java path, and will inspire for poorly created Java programs. Instead, a good on OOP and Java The book "Thinking in Java" and design methodology Areas that Goaf books Head First book, and a book to learn Java "route".


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -