• Post Reply Bookmark Topic Watch Topic
  • New Topic

primary key class

 
sid nagol
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if i have a composite class,
is it required that the class shoudl have instane variables as public
or is it suffciet it has public accessor methods for the instances.
i read conflicting statements on various online tests about this.
thanks
sid
 
sid nagol
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have one more question,
talking only about cmp
what are the valid types for cmp fields
1) primitives true or false
2) wrapper - true or false
3) serializable class?? how can this be possible??
does the seializable class have field names corresponing as abstract accessor methods in the bean class.
i aould greatly appreciate if u can give an example of this
thanks
 
sawan parihar
Ranch Hand
Posts: 250
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is it required that the class shoudl have instane variables as public or is it suffciet it has public accessor methods for the instances.


Yes the class should have public fields.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!