1

I would like to implement cell arrays (Matlab) in java. Since i am new to java programming i am not sure what could be used in java similar to cell arrays.

Can you please suggest me what can be used?

2 Answers 2

1

You could use arrays which are objects in java.
You can create an array in java as below:-

 int[] array=new int[10];

Above code will create an array of integers of size 10.

Two-dimensional arrays, called matrices (singular: matrix). A matrix resembles a table with rows and columns.

int [ ] [ ] marks = new int [ 4 ] [ 5 ] ; 

enter image description here

Above code int [ 4 ] [ 5 ] indicates that there will be four arrays of ints in the array marks, with 5 ints in each array of ints.

Sign up to request clarification or add additional context in comments.

Comments

0

Java have arrays too. If you are looking for cell arrays (matrices type), the key word to use is multi dimensional arrays.

2 Comments

Thanks...In multidimensional array is it possible to store arrays in each cell?
Yes, you can choose array as a type. So that you can store an array in place of element.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.