• Post Reply Bookmark Topic Watch Topic
  • New Topic

Can I use same name for members of a class  RSS feed

 
nirjari patel
Ranch Hand
Posts: 386
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can I use same name say repeatMember with different data types ?

int repeatMember ;

float repeatMember;

Thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66306
152
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
WHat happened when you tried it?
 
Greg Brannon
Bartender
Posts: 563
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And why would you want to?
 
nirjari patel
Ranch Hand
Posts: 386
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry for the post. I was just confused and could not think that I can not use same name for variables.

I did not even try it.

 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66306
152
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Trying things for yourself should be done long before you post here to ask about it.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!