The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
December 2000

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Very simple mistake

Posted by Kishori Sharan on December 07, 2000 at 10:50 AM

A very small mistake you are doing is declaring variable b as a parameter of method f as well as an object of class B. So just change one of the variable name and you are fine.

public void f(String s, boolean b){
B b = new B(s,b); // Duplicate b
...
}

Change To

public void f(String s, boolean b){
B b1 = new B(s,b); // Duplicate b
...
}






Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us