| Author |
one more question on arrays only
|
chetna jain
Greenhorn
Joined: Nov 08, 2001
Posts: 6
|
posted

0
|
class Test1 { public static int[ ] getArray() { return null; } public static void main(String[] args) { int index = 1; try { getArray()[index=2]++; } catch (Exception e){ } //empty catch System.out.println("index = " + index); } } i am not getting this question to what will be the output pls help me out.
|
 |
Valentin Crettaz
Gold Digger
Sheriff
Joined: Aug 26, 2001
Posts: 7610
|
|
the following JLS link http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#23902 explains it all... Happy reading HIH ------------------ Valentin Crettaz Sun Certified Programmer for Java 2 Platform
|
SCJP 5, SCJD, SCBCD, SCWCD, SCDJWS, IBM XML
[Blog] [Blogroll] [My Reviews] My Linked In
|
 |
chetna jain
Greenhorn
Joined: Nov 08, 2001
Posts: 6
|
posted

0
|
|
I am not getting what they have written in the link u provided. i'll be grateful if u help me out in this question
|
 |
Valentin Crettaz
Gold Digger
Sheriff
Joined: Aug 26, 2001
Posts: 7610
|
|
maybe the following link will be better http://java.sun.com/docs/books/tutorial/java/data/arrays.html HIH ------------------ Valentin Crettaz Sun Certified Programmer for Java 2 Platform
|
 |
 |
|
|
subject: one more question on arrays only
|
|
|