In Java what is the difference between following two statements ?
int a[],b;
int []a,b;

Answer Posted / parshad.doshi

Here First statement indicates that a is an array of type int and b is a simple integer type variable.
Second statement says that whatever follows by [] will be treated as an array. So a and b is declared as an array of type int.

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What's the difference b/w Table & Templete in Smartform?

1639


WS-NUM PIC S9(05)V(02) SIGN TRAILING SEPARATE MOVE '0050000+' TO WS-NUM The value stored is 00500,00+ MOVE '0050000-' TO WS-NUM Then what is the value will be stored in WS-NUM? Am getting '-00500,00'.....>>> What should I declare to WS-NUM so that I can get correct values for both + & - signs.

1846


Display names and numbers of employees who have 5 years or more experience and  salary less than Rs.15000 using array of structures (name, number, experience and  salary)

4297


what is the purpose of checked Menu options

1979


what is the main usage of an abstract keyword?please follow the program class A { void display() { System.out.println("hai"); } void print() { } } class B extends A { void print() { System.out.println("Hello"); } } In this program i was gives the implementation of print() according to my requirements in subclass.And there is no definition in superclass then why we can use abstract keyword before a method that i want to gives definition in other classes,is any mistakes in the above usage of method?

1474






is it acceptable if we declare multiple exceptions in same overridden method.

2108


Define distributed queries. can you explain me as soon as possible

1622


Is there any standard procedure to test the application as a whole? Or How can I test complete application right from the requirement gathering?

1467


how to get second highest salary from a employee table and how get a 5th highest salary from a employee table by using proc sql?

1889


Write a program to find duplicate number from array in minimum time complexity.

640


what is throws keyword

2989


Busy waiting is a method whereas a taskwaits for a given event by continiously checking for an event to occur. What is the main problem with this approach

1409


1.what is the vesition managment.

1674


when will triggars the at new event in abap and web dybn pro?

1488


what is meaning of MDM in sap?let me know that meaning

1679