This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Reassigning" Watch "Reassigning" New topic
Author

Reassigning

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...

 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Reassigning
 
Similar Threads
multidimensional array
Boone's mock exam Q47
Please Explain this Constructor parameter type ?
anonumous arrays?
2D arrays