File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Reassigning Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Reassigning" Watch "Reassigning" New topic


Guy Belpa
Ranch Hand

Joined: Nov 21, 2004
Posts: 41
int [] dots = new{3,4,5};
int [] sec = new{5,6,7};
dots =sec;
Is this okey? Truely what's happens here?
What happen to array hold(3,4,5) elements?
Vijay Vaddem
Ranch Hand

Joined: Feb 13, 2004
Posts: 243
Not OK unless you remove 'new'

try this and see the output...

I agree. Here's the link:
subject: Reassigning
It's not a secret anymore!