• 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:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

SCJP6 Exam notes

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'll keep adding stuff to this page as I prepare for my exam.

http://nikunjjariwala.blogspot.com/2010/04/sun-certified-java-programmer-exam.html

Thanks,
Nikunj Jariwala
 
Ranch Hand
Posts: 49
1
Netbeans IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello, Thanks for the notes. I am confused about this though

You can do Object[] myArr = new JButton[5]; but you cannot do List alist = new ArrayList ();


It's my understanding that List is the interface ArrayList uses, so having List alist refer to an ArrayList is not only possible but the prefered method of using ArrayList. I haven't tried to compile this so I know I could be wrong so please let me know if this is true.
 
Ranch Hand
Posts: 310
1
Oracle Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

John Mercier wrote:Hello, Thanks for the notes. I am confused about this though

You can do Object[] myArr = new JButton[5]; but you cannot do List alist = new ArrayList ();


It's my understanding that List is the interface ArrayList uses, so having List alist refer to an ArrayList is not only possible but the prefered method of using ArrayList. I haven't tried to compile this so I know I could be wrong so please let me know if this is true.



this is perfectly legal and a standard format because "ArrayList" implements "List" interface!
 
nikunj jariwala
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The HTML took the generics as HTML code. I have fixed it now.
Thanks for pointing it out.

- Nikunj
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for sharing this. It's pretty useful.
 
Poop goes in a willow feeder. Wipe with this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic