Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

problem in getPosition and setPosition......  RSS feed

 
Punit Jain
Ranch Hand
Posts: 1028
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cpoint.java



Main.java



code is working, my question is why and how we use getPosition() and setPosition(), however

System.out.println(this.getPosition()); this can be done using this also System.out.println(x);

and also is something wrong i m doing here to implement these two methods..?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!