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.javaB、 add public to the start of line 4 in GrizzlyBear.javaC、 add import animals.mammals.*; at line 2 in Salmon.javaD、 add import animals.fish.*; at line 2 in GrizzlyBear.javaE、 add import animals.fish.Salmon.*; at line 2 in GrizzlyBear.javaF、 add import animals.mammals.GrizzlyBear.*;at line 2 in Salmon.java

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

相关考题:

● (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.RecordB.ArrayC.ParameterD.File

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.

Given:11.servlet12.servlet-namecatalog/servlet-name13.jsp-file/catalogTemplate.jsp/jsp-file14.load-on-startup10/load-on-startup15./servletWhichtwoaretrue?()A.Line13isnotvalidforaservletdeclaration.B.Line14isnotvalidforaservletdeclaration.C.Oneinstanceoftheservletwillbeloadedatstartup.D.Teninstancesoftheservletwillbeloadedatstartup.E.Theservletwillbereferencedbythenamecataloginmappings.

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.

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 databaseB. To restrict the amount of space that is used by the backupsC. 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.

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.

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.

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

Given the following router output,which configuration file will the router use at its next reload?() A.configB.clientqos.cnfC.startup-configD.running-configuration

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.

is a contiguous, numbered set of variables of a given base type, which can be used and passed to functions as a unit.A.RecordB.ArrayC.ParameterD.File

HLR中呼转号码的分析源取决于()A、GRI路由上的MIS1参数B、MGISI中的OBA参数C、MGISI中的BO参数D、以上都不对

In order to support Live Partition Mobility (LPM) for a given LPAR between two Power servers, which type of backing device should be chosen for the storage devices presented from the VIO server to the LPAR?()A、LUN-backed devicesB、File-backed devicesC、Logical volume-backed devicesD、Network Filesystem-backed (NFS) devices

GRI4是针对企业的()。A、财务报告B、可持续发展报告C、经营管理D、社会责任管理

An administrator is trying to extend an existing volume group with a new hard disk, but the extendvg command returns the following error. 0516-1162 /usr/sbin/extendvg. Warning, The Physical Partition Size of 64 requires the creation of 8924 partitions for hdisk11. The limitation for volume group datavg is 1016 physical partitions per physical volume. Use chvg command with -t option to attempt to change the maximum Physical Partitions per Physical volume for this volume group. The chvg -t may or may not allow the extendvg command to succeed. What is the implication of using this option?()A、It reduces the maximum file size allowed within the given volume group.B、It reduces the maximum number of files allowed within the given volume group.C、It reduces the maximum number of logical volumes allowed within the given volume group.D、It reduces the maximum number of physical volumes allowed within the given volume group.

The file “file.txt” exists on the file system and contsins ASCII text.  Given:   try {   File f = new File(“file.txt”);    OutputStream out = new FileOutputStream(f, true);   }    catch (IOException) {}   What is the result?()A、 The code does not compile.B、 The code runs and no change is made to the file.C、 The code runs and sets the length of the file to 0.D、 An exception is thrown because the file is not closed.E、 The code runs and deletes the file from the file system.

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 databaseB、To restrict the amount of space that is used by the backupsC、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.

单选题Given the following router output,which configuration file will the router use at its next reload?()A configB clientqos.cnfC startup-configD running-configuration

单选题The file “file.txt” exists on the file system and contsins ASCII text.  Given:   try {   File f = new File(“file.txt”);    OutputStream out = new FileOutputStream(f, true);   }    catch (IOException) {}   What is the result?()A The code does not compile.B The code runs and no change is made to the file.C The code runs and sets the length of the file to 0.D An exception is thrown because the file is not closed.E The code runs and deletes the file from the file system.

单选题Which method implementations will write the given string to a file named "file", using UTF8 encoding?()   IMPLEMENTATION a:   public void write(String msg) throws IOException {   FileWriter fw = new FileWriter(new File("file"));   fw.write(msg);   fw.close();   }   IMPLEMENTATION b:   public void write(String msg) throws IOException {   OutputStreamWriter osw =  new OutputStreamWriter(new FileOutputStream("file"), "UTF8");  osw.write(msg);   osw.close();   }   IMPLEMENTATION c:   public void write(String msg) throws IOException {  FileWriter fw = new FileWriter(new File("file"));   fw.setEncoding("UTF8");   fw.write(msg);   fw.close();  }   IMPLEMENTATION d:   public void write(String msg) throws IOException {  FilterWriter fw = FilterWriter(new FileWriter("file"), "UTF8");   fw.write(msg);  fw.close();   }   IMPLEMENTATION e:   public void write(String msg) throws IOException {   OutputStreamWriter osw = new OutputStreamWriter(  new OutputStream(new File("file")), "UTF8"  );   osw.write(msg);   osw.close();   }AImplementation a.BImplementation b.CImplementation c.DImplementation d.EImplementation e.

单选题Given that file is a reference to a File object that represents a directory, which code fragments will succeed in obtaining a list of the entries in the directory?()AVector filelist = ((Directory) file).getList();BString[] filelist = file.directory();CEnumeration filelist = file.contents();DString[] filelist = file.list();EVector filelist = (new Directory(file)).files();

单选题Which statements are true, given the code new FileOutputStream("data", true) for creating an object of class FileOutputStream?()AFileOutputStream has no constructors matching the given arguments.BAn IOExeception will be thrown if a file named data already exists.CAn IOExeception will be thrown if a file named data does not already exist.DIf a file named data exists, its contents will be reset and overwritten.EIf a file named data exists, output will be appended to its current contents.

单选题Given a portion of a valid Java EE web application’s directory structure: MyApp | |-- File1.html | |-- Directory1 ||-- File2.html| |-- META-INF |-- File3.html You want to know whether File1.html, File2.html, and/or File3.html will be directly accessible by your webclient’s browsers. Which statement is true?()AAll three files are directly accessible.BOnly File1.html is directly accessible.COnly File2.html is directly accessible.DOnly File3.html is directly accessible.EOnly File1.html and File2.html are directly accessible.

单选题GRI4是针对企业的()。A财务报告B可持续发展报告C经营管理D社会责任管理

单选题Given a portion of a valid Java EE web application’s directory structure:MyApp | |--Directory1 ||--File1.html| |--META-INF|  |--File2.html| |--WEB-INF |--File3.html You want to know whether File1.html, File2.html,and/or File3.html is protected from direct access by yourweb client’s browsers. What statement is true?()AAll three files are directly accessible.BOnly File1.html is directly accessible.COnly File2.html is directly accessible.DOnly File3.html is directly accessible.

多选题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. ()(Choose two.)ATo store the backup information of multiple databaseBTo restrict the amount of space that is used by the backupsCTo maintain a backup for a certain time is set by the CONTROL_FILE_RECORD_KEEP_TIME parameter.DTo list the data files that were in a target database at a given time by using the AT option of REPORT SCHEMA command.

单选题An administrator is trying to extend an existing volume group with a new hard disk, but the extendvg command returns the following error. 0516-1162 /usr/sbin/extendvg. Warning, The Physical Partition Size of 64 requires the creation of 8924 partitions for hdisk11. The limitation for volume group datavg is 1016 physical partitions per physical volume. Use chvg command with -t option to attempt to change the maximum Physical Partitions per Physical volume for this volume group. The chvg -t may or may not allow the extendvg command to succeed. What is the implication of using this option?()AIt reduces the maximum file size allowed within the given volume group.BIt reduces the maximum number of files allowed within the given volume group.CIt reduces the maximum number of logical volumes allowed within the given volume group.DIt reduces the maximum number of physical volumes allowed within the given volume group.

单选题Given that the current directory is empty, and that the user has read and write privileges to the current directory, 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.