Breakpoint doesn't break [message #255198] |
Thu, 01 May 2008 15:42 |
Jonathan Camilleri Messages: 91 Registered: July 2009 |
Member |
|
|
I've set a breakpoint next to an if statement but the code runs without
breaking.
Any idea why?
public class ManagerTest
{
public static void main(String[] args)
{
// construct a Manager object
Manager boss = new Manager("Harry Hacker", 50000, 1989, 10, 1);
boss.setBonus(5000);
Employee[] staff = new Employee[3];
// fill the staff array with Manager and Employee objects
staff[0] = boss;
staff[1] = new Employee("Harry Hacker", 50000, 1989, 10, 1);
staff[2] = new Employee("Tommy Tester", 40000, 1990, 3, 15);
if ((staff[0] instanceof Manager)
&& staff[0].equals(staff[1])) { //***BREAKPOINT HERE***
System.out.println("true");
}
}}
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04653 seconds