hi all , how are u? i have a question , i have a java project and i want to check if a fucntion is called or executed while the execution of the program ..how can i do this ?....thnx in advance...

Recommended Answers

All 9 Replies

Add a log message in the function.
Example: System.out.println( "Method called" )

i want to make an if statement that checks if the function is called or no ...thnx for help btw.

You could lat the function set a public boolean when it's called, then you can check that later?

You can have a variable take a specific value in the method, and then check that variable's value.

it dosen't solve my problem :S

It should have solved your problem if you followed our suggestions and if you have done it right.

Do you have some code for us to see?

for starters you can simply put a System.out.print() in the function saying its called ... i assume you are doing this for debugging purposes

i'll post some code later ..........thnx alot for helping me

thnx alot ...i found out a way ..thnx alot my friends

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.