Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Hisham Younis   on Feb 08 In Java Category.

  
Question Answered By: May Hansen   on Feb 08

In treeCounter, do you have a method  gV() or a variable  gV? If it is a
method, then your code would be:

oNum = dp.gV();

If it is a variable, then you can declare the variable as public in your
treeCounter and do this:

oNum = db.gV;

However, the second example is not good object-oriented programming as
it breaks encapsulation.

You did not provide the code where gV the method or variable can be
found, so I am not sure how to interpret this.

Share: 

 

This Question has 9 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on variable accesibility Or get search suggestion and latest updates.


Tagged: