单选题You have read/write permission on an ordinary file foo. You have just run In foo bar. What would happen if you ran rm foo?()Afoo and bar would both be removed.Bfoo would be removed while bar would remain accessible.Cfoo would be removed, bar would stil

题目
单选题
You have read/write permission on an ordinary file foo. You have just run In foo bar. What would happen if you ran rm foo?()
A

 foo and bar would both be removed.

B

 foo would be removed while bar would remain accessible.

C

 foo would be removed, bar would still exist but would be unusable.

D

 Both foo and bar would remain accessible.

E

 You would be asked whether bar should be removed.


相似考题
更多“单选题You have read/write permission on an ordinary file foo. You have just run In foo bar. What would happen if you ran rm foo?()A  foo and bar would both be removed.B  foo would be removed while bar would remain accessible.C  foo would be removed, bar woul”相关问题
  • 第1题:

    You are looking for an executable file foo. Select the command that would search forfoo within directories set in the shell variable, PATH.()

    • A、 locate
    • B、 which
    • C、 find
    • D、 query
    • E、 whereis

    正确答案:B

  • 第2题:

    Which code determines the int value foo closest to a double value bar?()  

    • A、 Int foo = (int) Math.max(bar);
    • B、 Int foo = (int) Math.min(bar);
    • C、 Int foo = (int) Math.abs(bar);
    • D、 Int foo = (int) Math.ceil(bar);
    • E、 Int foo = (int) Math.floor(bar);
    • F、 Int foo = (int) Math.round(bar);

    正确答案:F

  • 第3题:

    Which statements concerning the relationships between the following classes are true?()   class Foo {  int num;   Baz comp = new Baz();   }   class Bar {  boolean flag;   }   class Baz extends Foo {   Bar thing = new Bar();   double limit;   }  

    • A、A Bar is a Baz.
    • B、A Foo has a Bar.
    • C、A Baz is a Foo.
    • D、A Foo is a Baz.
    • E、A Baz has a Bar.

    正确答案:C,E

  • 第4题:

    String foo = “blue”;  Boolean[]bar = new Boolean [1];  if (bar[0])  {  foo = “green”;  }   What is the result? () 

    • A、 Foo has the value of “”
    • B、 Foo has the value of null.
    • C、 Foo has the value of “blue”
    • D、 Foo has the value of “green”
    • E、 An exception is thrown.
    • F、 The code will not compile.

    正确答案:F

  • 第5题:

    String foo = “blue”;    Booleanbar = new Boolean [1];    if (bar[0]) {    foo = “green”;    }   What is the result?()  

    • A、 Foo has the value of “”
    • B、 Foo has the value of null.
    • C、 Foo has the value of “blue”
    • D、 Foo has the value of “green”
    • E、 An exception is thrown.
    • F、 The code will not compile.

    正确答案:F

  • 第6题:

    public class Foo {  public int a;  public Foo() { a = 3; }  public void addFive() { a += 5; }  }  and:  public class Bar extends Foo { public int a;  public Bar() { a = 8; }  public void addFive() { this.a +=5; }  }  invoked with:  Foo foo = new Bar();  foo.addFive();  System.out.println(”Value: “+ foo.a);  What is the result?() 

    • A、 Value: 3
    • B、 Value: 8
    • C、 Value: 13
    • D、 Compilation fails.
    • E、 The code runs with no output.
    • F、 An exception is thrown at runtime.

    正确答案:A

  • 第7题:

    单选题
    You are looking for an executable file foo. Select the command that would search forfoo within directories set in the shell variable, PATH.()
    A

     locate

    B

     which

    C

     find

    D

     query

    E

     whereis


    正确答案: A
    解析: 暂无解析

  • 第8题:

    单选题
    Given: foo and bar are public references available to many other threads. foo refers to a Thread and bar is anObject.  The thread foo is currently executing bar.wait().  From another thread,what provides the most reliable wayto ensure that foo will stop executing wait()?
    A

    foo.notify();

    B

    bar.notify();

    C

    foo.notifyAll();

    D

    Thread.notify();

    E

    bar.notifyAll();


    正确答案: B
    解析: 暂无解析

  • 第9题:

    单选题
    Given:  foo and bar are public references available to many other threads, foo refers to a Thread and bar is an Object. The thread foo is currently executing bar.wait().  From another thread, what provides the most reliable way to ensure that foo will stop executing wait()?()
    A

    foo.notify();

    B

    bar.notify();

    C

    foo.notifyAll();

    D

    Thread.notify();

    E

    bar.notifyAll();

    F

    Object.notify();


    正确答案: D
    解析: 暂无解析

  • 第10题:

    单选题
    String foo = “blue”;    Booleanbar = new Boolean [1];    if (bar[0]) {    foo = “green”;    }   What is the result?()
    A

     Foo has the value of “”

    B

     Foo has the value of null.

    C

     Foo has the value of “blue”

    D

     Foo has the value of “green”

    E

     An exception is thrown.

    F

     The code will not compile.


    正确答案: E
    解析: 暂无解析

  • 第11题:

    单选题
    Which code determines the int value foo closest to a double value bar?()
    A

     Int foo = (int) Math.max(bar);

    B

     Int foo = (int) Math.min(bar);

    C

     Int foo = (int) Math.abs(bar);

    D

     Int foo = (int) Math.ceil(bar);

    E

     Int foo = (int) Math.floor(bar);

    F

     Int foo = (int) Math.round(bar);


    正确答案: D
    解析: 暂无解析

  • 第12题:

    多选题
    Which statements concerning the relationships between the following classes are true?()   class Foo {  int num;   Baz comp = new Baz();   }   class Bar {  boolean flag;   }   class Baz extends Foo {   Bar thing = new Bar();   double limit;   }
    A

    A Bar is a Baz.

    B

    A Foo has a Bar.

    C

    A Baz is a Foo.

    D

    A Foo is a Baz.

    E

    A Baz has a Bar.


    正确答案: E,A
    解析: 暂无解析

  • 第13题:

    You have read/write permission on an ordinary file foo. You have just run In foo bar. What would happen if you ran rm foo?()

    • A、 foo and bar would both be removed.
    • B、 foo would be removed while bar would remain accessible.
    • C、 foo would be removed, bar would still exist but would be unusable.
    • D、 Both foo and bar would remain accessible.
    • E、 You would be asked whether bar should be removed.

    正确答案:B

  • 第14题:

    Given:  foo and bar are public references available to many other threads, foo refers to a Thread and bar is an Object. The thread foo is currently executing bar.wait().  From another thread, what provides the most reliable way to ensure that foo will stop executing wait()?()

    • A、foo.notify();
    • B、bar.notify();
    • C、foo.notifyAll();
    • D、Thread.notify();
    • E、bar.notifyAll();
    • F、Object.notify();

    正确答案:E

  • 第15题:

    A custom tag is defined to take three attributes. Which two correctly invoke the tag within a JSP page?()

    • A、<prefix:myTag a="foo" b="bar" c="baz" />
    • B、<prefix:myTag attributes={"foo","bar","baz"} />
    • C、<prefix:myTag jsp:attribute a="foo" b="bar" c="baz" />
    • D、<prefix:myTag><jsp:attribute name="a">foo</jsp:attribute><jsp:attribute name="b">bar</jsp:attribute><jsp:attribute name="c">baz</jsp:attribute>. </prefix:myTag>

    正确答案:A,B,D

  • 第16题:

    foo and bar are public references available to many other threads. foo refers to a Thread and bar is an Object. The thread foo is currently executing bar.wait(). From another thread, which statement is the most reliable way to ensue that foo will stop executing wait()? 

    • A、 foo.notify();
    • B、 bar.notify();
    • C、 foo.notifyAll();
    • D、 Thread.notify();
    • E、 bar.notiFYAll();
    • F、 Object.notify();

    正确答案:E

  • 第17题:

    10. interface Foo {  11. int bar();  12. }  13.  14. public class Beta {  15.  16. class A implements Foo {  17. public int bar() { return 1; }  18. }  19.  20. public int fubar( Foo foo) { return foo.bar(); }  21.  22. public void testFoo() {  23.  24. class A implements Foo {  25. public int bar() { return 2; }  26. }  27.  28. System.out.println( fubar( new A())); 29. }  30.  31. public static void main( String[] argv) {  32. new Beta().testFoo();  33. }  34. }  Which three statements are true?()

    • A、 Compilation fails.
    • B、 The code compiles and the output is 2.
    • C、 If lines 16, 17 and 18 were removed, compilation would fail.
    • D、 If lines 24, 25 and 26 were removed, compilation would fail.
    • E、 If lines 16, 17 and 18 were removed, the code would compile and the output would be 2.
    • F、 If lines 24, 25 and 26 were removed, the code would compile and the output would be 1.

    正确答案:B,E,F

  • 第18题:

    Given: foo and bar are public references available to many other threads. foo refers to a Thread and bar is anObject.  The thread foo is currently executing bar.wait().  From another thread,what provides the most reliable wayto ensure that foo will stop executing wait()?

    • A、foo.notify();
    • B、bar.notify();
    • C、foo.notifyAll();
    • D、Thread.notify();
    • E、bar.notifyAll();

    正确答案:E

  • 第19题:

    单选题
    public class Foo {  public int a;  public Foo() { a = 3; }  public void addFive() { a += 5; }  }  and:  public class Bar extends Foo { public int a;  public Bar() { a = 8; }  public void addFive() { this.a +=5; }  }  invoked with:  Foo foo = new Bar();  foo.addFive();  System.out.println(”Value: “+ foo.a);  What is the result?()
    A

     Value: 3

    B

     Value: 8

    C

     Value: 13

    D

     Compilation fails.

    E

     The code runs with no output.

    F

     An exception is thrown at runtime.


    正确答案: F
    解析: 暂无解析

  • 第20题:

    单选题
    foo and bar are public references available to many other threads. foo refers to a Thread and bar is an Object. The thread foo is currently executing bar.wait(). From another thread, which statement is the most reliable way to ensue that foo will stop executing wait()?
    A

     foo.notify();

    B

     bar.notify();

    C

     foo.notifyAll();

    D

     Thread.notify();

    E

     bar.notiFYAll();

    F

     Object.notify();


    正确答案: D
    解析: 暂无解析

  • 第21题:

    单选题
    String foo = “blue”;  Boolean[]bar = new Boolean [1];  if (bar[0])  {  foo = “green”;  }   What is the result? ()
    A

     Foo has the value of “”

    B

     Foo has the value of null.

    C

     Foo has the value of “blue”

    D

     Foo has the value of “green”

    E

     An exception is thrown.

    F

     The code will not compile.


    正确答案: C
    解析: 暂无解析

  • 第22题:

    单选题
    10. interface Foo { int bar(); }  11. public class Sprite {  12. public int fubar( Foo foo) { return foo.bar(); }  13. public void testFoo() {  14. fubar(  15. // insert code here  16.);  17. }  18. }  Which code, inserted at line 15, allows the class Sprite to compile?()
    A

     Foo { public int bar() { return 1; } }

    B

     new Foo { public int bar() { return 1; } }

    C

     newFoo() { public int bar(){return 1; } }

    D

     new class Foo { public int bar() { return 1; } }


    正确答案: D
    解析: 暂无解析

  • 第23题:

    问答题
    If DOG is written HSK, how would you write the code word for BAR?

    正确答案: FEV
    解析:
    题意:如果dog写成hsk, 那么bar应该写成什么呢?根据分析,D写成H,隔了3隔字母;O写成S,隔了3个字母;G写成K,隔了3个字母;可以推知B写成F,A写成E,以此类推,故bar写成FEV。

  • 第24题:

    单选题
    You have read/write permission on an ordinary file foo. You have just run In foo bar. What would happen if you ran rm foo?()
    A

     foo and bar would both be removed.

    B

     foo would be removed while bar would remain accessible.

    C

     foo would be removed, bar would still exist but would be unusable.

    D

     Both foo and bar would remain accessible.

    E

     You would be asked whether bar should be removed.


    正确答案: E
    解析: 暂无解析