Hi All,
I have 2 classes. say Class A and Class B. My logic is coded in a method in class B. I am accessing this method of class B by creating an instance of class B in class A.

To explain better:
Class A{

ClassB b = new ClassB();
b.parse();
}

Class B{

parse(){
// some logic code.
}

At the end of processing the logic in parse() of Class B, I wish to set a boolean flag in Class B. such that after parse() returns what it has to, I will check the flag value and process some stuff in Class A. How can I design my solution? I tried using a static flg value in Class B. But this will not hold good in my case, because there are concurrent users to sign in to my application. Please guide and help.

Thanks,
Ashok.

Recommended Answers

All 2 Replies

i'll give you these hints, create a boolean variable in class B, make it private and use accessors/mutators to access and change that variable... now you need to learn how to use accessors and mutators> GooD Luck

Yups done that...i hope you mean getters/ setters.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.