Given a file Gri

题目

Given a file GrizzlyBear.java:  1. package animals.mammals;  2.  3. public class GrizzlyBear extends Bear {  4. void hunt() {  5. Salmon s = findSalmon();  6. s.consume();  7. }  8. }  and another file, Salmon.java:  1. package animals.fish; 2.  3. public class Salmon extends Fish {  4. void consume() { /* do stuff */ }  5. }  Assume both classes are defined in the correct directories for theft packages, and that the Mammal class correctly defines the findSalmon() method. Which two changes allow this code to compile correctly?()

  • A、 add public to the start of line 4 in Salmon.java
  • B、 add public to the start of line 4 in GrizzlyBear.java
  • C、 add import animals.mammals.*; at line 2 in Salmon.java
  • D、 add import animals.fish.*; at line 2 in GrizzlyBear.java
  • E、 add import animals.fish.Salmon.*; at line 2 in GrizzlyBear.java
  • F、 add import animals.mammals.GrizzlyBear.*;at line 2 in Salmon.java
如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

Given:11.<servlet>12.<servlet-name>catalog</servlet-name>13.<jsp-file>/catalogTemplate.jsp</jsp-file>14.<load-on-startup>10</load-on-startup>15.</servlet>Whichtwoaretrue?()

A.Line13isnotvalidforaservletdeclaration.

B.Line14isnotvalidforaservletdeclaration.

C.Oneinstanceoftheservletwillbeloadedatstartup.

D.Teninstancesoftheservletwillbeloadedatstartup.

E.Theservletwillbereferencedbythenamecataloginmappings.


参考答案:C, E

第2题:

You are using the control file to maintain information about the database backups that are being performed by Recovery Manager (RMAN). Identify two scenarios is which you must have a recovery catalog.()

A. To store the backup information of multiple database

B. To restrict the amount of space that is used by the backups

C. To maintain a backup for a certain time is set by the CONTROL_FILE_RECORD_KEEP_TIME parameter.

D. To list the data files that were in a target database at a given time by using the AT option of REPORT SCHEMA command.


参考答案:A, D

第3题:

● (74) is a contiguous,numbered set of variables of a given base type,which can be used and passed to functions as a unit.

(74) A.Record

B.Array

C.Parameter

D.File


正确答案:B
【解析】译文: 数组是一个由给定基本类型的变量组成的连续有序的集合,它可以作为一个单元使用或者传给某个函数。

第4题:

Given the following router output,which configuration file will the router use at its next reload?()

A.config

B.clientqos.cnf

C.startup-config

D.running-configuration


参考答案:D

第5题:

Given that the current directory is empty, and that the user has read and write permissions, and the following:Which statement is true?()

A.Compilation fails.

B.The file system has a new empty directory named dir.

C.The file system has a new empty directory named newDir.

D.The file system has a directory named dir, containing a file f1.txt.

E.The file system has a directory named newDir, containing a file f1.txt.


参考答案:E

第6题:

Thefilefile.txt”existsonthefilesystemandcontsinsASCIItext.Given:try{Filef=newFile(file.txt”);OutputStreamout=newFileOutputStream(f,true);}catch(IOException){}Whatistheresult?()

A.Thecodedoesnotcompile.

B.Thecoderunsandnochangeismadetothefile.

C.Thecoderunsandsetsthelengthofthefileto0.

D.Anexceptionisthrownbecausethefileisnotclosed.

E.Thecoderunsanddeletesthefilefromthefilesystem.


参考答案:A

第7题:

Given that the current directory is empty, and that the user has read and write privileges to the current, and the following:Which statement is true?()

A.Compilation fails.

B.Nothing is added to the file system.

C.Only a new file is created on the file system.

D.Only a new directory is created on the file system.

E.Both a new file and a new directory are created on the file system.


参考答案:B

第8题:

Certkiller.com has given you the task of serializing an object and writing it to a data file using binary serialization.You need to ensure that you meet these requirements.What should you do?()

A.

B.

C.

D.


参考答案:A

第9题:

检索“学生”表中“性别”为“女”的学生记录,将结果保存到文本文件gri1中,SQL语句为:

SELECT*FROM学生WHERE性别="女"______gri1


正确答案:TO FILE
TO FILE

第10题:

Certkiller .com has a file server named Certkiller -SR07 that stores old inventory files. Certkiller .com has given you the task of creating an application to archive these old inventory files.The inventory files have to be compressed prior to being uploaded to Certkiller .com‘s Web server.You are currently writing a method that will receive a byte array and compress it into a new file.You need to ensure that a data corruption check takes place during the decompression process.What should you do?()

A.

B.

C.

D.


参考答案:D

更多相关问题