• Post Reply Bookmark Topic Watch Topic
  • New Topic

object parameter  RSS feed

 
sujesh Katri
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can we pass private final class object to another class constructor?
 
Winston Gutkowski
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sujesh Katri wrote:can we pass private final class object to another class constructor?

Sure, providing you call it from the class that contains the field.

sujesh, I wonder if you are actually making the best use of your (or our) time. We're here to help, but you're not going to learn Java by simply machine-gunning questions to a forum.
You need to read and practise, and I believe you've already been given several suggestions as to where to start. Make mistakes and learn from them, rather than trying to get the "right" answer before you even attempt anything.

People will be far more willing to help you if you ShowSomeEffort (←click). In fact, I suggest you read the entire HowToAskQuestionsOnJavaRanch page.

Winston
 
sujesh Katri
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i read my entire sir notes very well with practical knowledge...how can i gain more java knowledge please tell me...in my college days and even in the institution i'm very well.....but these are unknown to me...tell me best java sources i wil surely imporve my knowledge
 
fred rosenberger
lowercase baba
Bartender
Posts: 12563
49
Chrome Java Linux
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The best way to learn is to DO it. Instead of asking "Can I do abc?", why not just write some code and see what happens when you TRY it?

then, if it doesn't do what you expect, you can come back and ask "I though it would do X, but it actually did Y. Can someone tell me where I went wrong?" Folks then see you making an effort and are often much more willing to help you.
 
Campbell Ritchie
Marshal
Posts: 56529
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
fred rosenberger wrote: . . . "I though it would do X, but it actually did Y. . . ." . . .
And that sort of question is always more interesting to answer.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!