• Post Reply Bookmark Topic Watch Topic
  • New Topic

getting values to parameter  RSS feed

 
Priya chek
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Iam doing a project..please help me to clear this doubt..
Here i have used hard coding values. i want to get values from a method in a class .

ContactCreateCommand cmd1 = new ContactCreateCommand("sdddf345",post , "bcd@gmail.com");
so can i get values using object of a class inside parameter??? like
ContactCreateCommand cmd1 = new ContactCreateCommand(CreateReq.getUsername(),CreateReq.getRegistrantID(),post , "bcdl@gmail.com");

waiting for your valuable reply
thanks in advance
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16057
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. It doesn't matter if you do:

or:

The result is exactly the same.
 
Priya chek
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok yar..Thanks.. i got it..
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!