aspose file tools*
The moose likes Java in General and the fly likes Urgent help needed.How to skip a LOC execution in method def Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Reply locked New topic
Author

Urgent help needed.How to skip a LOC execution in method def

NarayanaRao Konakalla
Greenhorn

Joined: Jan 29, 2008
Posts: 13
Hi
I would like to get a clue about how to skip execution of a line of code in a method definition.Below is the scenario.

public PublicClass{

public void methodA(){

line1;
line2;
line3;

}
public static void main(String args){

PublicClass pc = new PublicClass();

pc.methodA();

}

}

That is the scenario.How could i see that line3 is not executed when the method methodA() is invoked in main method.
But, line3 should not be commented or any conditions should not be checked in methodA() definition.we should control this execution(skipping line3) from outside that methodA() definition.
Acutally this line3 has to be skipped as a part of testing.Hope i'll get help very soon.

Thanks
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19541
    
  16

Please Use One Thread Per Question. Let's continue here.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
 
subject: Urgent help needed.How to skip a LOC execution in method def
 
Similar Threads
overiding method(own code)
Differance in overriding variable and method
please see the following code:
How to skip execution of a line in a java method defition.Urgent help needed ranchers
how to skip execution of a line in a method..need help ranchers