Home Java Referring to any object
Reply: 0

Java Referring to any object

user322
1#
user322 Published in May 21, 2018, 12:50 pm

I would like to find an object. There is only one object with the variable x=10. Is it possible? I hope you get what I try to explain... :)

if (any object of the class X .getValue() == 10)
...

Class X

 public int getValue(){
    return x;
    }
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.65107 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO