Question: this is my code :

```
public class Test {
 public static void main(String[] args) throws Exception {
  String logPath = "D:\\mywork\\OMS\\Tymon\\testlog\\testlog.log";
  File file = new File(logPath);

  SchedulerFactory schedFact = new StdSchedulerFactory();
  Scheduler sched = schedFact.getScheduler();
  sched.start();
  JobDetail jobDetail = new JobDetail("a", "b", TestJob.class);

  CronTrigger trigger = new CronTrigger("c", "d");
  trigger.setCronExpression("0/23 * * * * ?");
  sched.scheduleJob(jobDetail, trigger);
 }
}

```

when the job is running, the file **"D:\mywork\OMS\Tymon\testlog\testlog.log"** can't be renamed and deleted.

it seems like the file handle always be held

how fix it ?
please help ~

Answer: 
That is because `B` defines a different `f`, which *hides* the `f` inherited from `A`. If you want both available in `B` (which is likely), you must bring it into scope with a *using-declaration:*

```
class B : public A
{
  void f() {}
  using A::f;
};

```

This behaviour is specified in [class.member.loopkup], especially paragrah 4.
This is called Hiding - you can check the [C++ FAQ Entry](http://www.parashift.com/c++-faq/hiding-rule.html). It describes the problem and the solution.