Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within OCPJP
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Tim Cooke
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Liutauras Vilda
Sheriffs:
Rob Spoor
Junilu Lacar
paul wheaton
Saloon Keepers:
Stephan van Hulst
Tim Moores
Tim Holloway
Carey Brown
Scott Selikoff
Bartenders:
Piet Souris
Jj Roberts
fred rosenberger
Forum:
Programmer Certification (OCPJP)
one more question on arrays only
chetna jain
Greenhorn
Posts: 6
posted 20 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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
Author & Gold Digger
Posts: 7617
6
I like...
posted 20 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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
My Linked In
chetna jain
Greenhorn
Posts: 6
posted 20 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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
Author & Gold Digger
Posts: 7617
6
I like...
posted 20 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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
My Linked In
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Exception Question.
How expression is working
Mock Question Doubt...EQ+..Operators and Assignment
expression evaluation
Statement Exceution
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
More...