yeah, i want to know how to calculate the length of 2d array while converting it into 1d array
when i simply used a.length for my 2d array and put it into my 1d array ,then 1d array will print only first column then exception comes Array index out of bound
yup i got the idea and it works like this
int b = new int[a.length*a.length];
//output is 9
//is this the way of getting length of 2d into 1d array?
I am currently coding in JSF, but using Java for the back-end beans. Was wondering if anyone is familiar to JSF, to help get a solution or an idea on how I could proceed.
So, if I have a database with 2 tables - Country & State,
but I don't want to have to make a call into the database in order to reduce the resources used. How would I implement in the Java bean a connection between the country and its related states?
Considering that I have the 2 selections in a dropdown menu.
a very beginner question...
i'm a newbie in programming... just started java and read about packaging... i created i directory called firstproject and put a directory with one class inside of it and a FirstProject source file in the firstproject directory itself.
i made a class in that package directory that has a private string in it and tried to invoke from FirstProject source file but
getting compile error that the string is private...
i tried changing the string into protected or even public but still getting this error...
this is the class src file...