Science, asked by smmamatha008, 4 months ago

Justify and Explain alternate way to accept Array*
public class Test {
private int data = 5;
public int getData() {
return this.data; }
public int getData(int value) {
return (data+1); }
public int getData (int... value) {
return (data+2);}
public static void main (String [] args) {
Test temp = new Test ();
System.out.println(temp.getData(7, 8, 12));
,
}​

Answers

Answered by Anonymous
0

Answer:

For example, take an array of integers 'n'. int n[ 6]; ... We can also declare an array by another method. ... Similar to one-dimensional array, we define a 2-dimensional array as below.

Similar questions