Meaningless Drivel is fun!
The moose likes Beginning Java and the fly likes how to get values in an object? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Barcodes with iOS this week in the iOS forum
or Core Java for the Impatient in the Java 8 forum!

JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic

how to get values in an object?

maggie karve
Ranch Hand

Joined: Dec 29, 2009
Posts: 187

i want all values to come in b1.....???
Prithvi Sehgal
Ranch Hand

Joined: Oct 13, 2009
Posts: 774
Hello Maggie,

I don't think this question is related to SCJP forum. Please move it to Java in General or some other appropriate forum.

Anyhow, to add the objects inside the collection it should be this way

Hope this helps,

My Blog, Follow me on Twitter,Scjp Tips, When you score low in mocks, Generics,Scjp Notes, JavaStudyGroup
David Newton

Joined: Sep 29, 2008
Posts: 12617

What isn't working?
Rob Spoor

Joined: Oct 27, 2005
Posts: 19896

Except for bad indentation I see nothing wrong with that code.

How To Ask Questions How To Answer Questions
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14589

Please don't post the same question in multiple forums. I'm locking this one; continue in the other copy.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
I agree. Here's the link:
subject: how to get values in an object?