2. The extension name of a Java bytecode file is _______.A. .java B. .obj C. .class D. .exe
答案c
翻译:在对Java字节码文件的扩展名是
class文件是java编译后的文件,它不是源代码,真正的java源代码是.java文件。 java源代码是txt格式的.java文件,用记事本就可以打开。
第1题:
阅读下列说明和c++代码,将应填入 (n) 处的字句写在答题纸的对应栏内。
【说明】
现欲构造一文件/目录树,采用组合(Composite)设计模式来设计,得到的类图如6—7所示:
【c++代码】
include<1ist>
include
include
using namespace std;
class AbstractFile{
protected:
string name;//文件或目录名称
public:
void printName(){cout<*getChildren()=0; //获得一个目录的子目录或文件
};
class File:public AbstractFile{
public:
File(string name){ (1) =name;)
void addChild(AbstractFile*file){return ;)
void removeChiid(AbstractFile*file){return;}(2) getChildren(){return ( 3 ) ;}
};
class Folder:public AbstractFile{
private:
listchildList; //存储子目录或文件
public:
Folder(string name){ (4) =name;}
void addChild(AbstractFile*file){childList.push back(file);}
void removeChiid(AbstractFile*file)(chiidList.remove(file);}
list*getChildren(){return (5) ;)
};
voidmain(){
//构造一个树形的文件/目录结构
AbstractFile*rootFolder=new Folder(“C:\\”);
AbstractFile*compositeFolder=flew Folder(”composite”);
AbstractFile*windowsFolder=new Folder(”windows”);
AbstractFile*file=new File(”TestComposite.java”);
rootFolder->addChild(compositeFolder);
rootFolder->addChild (windowsFolder);
compositeFolder->addChiid(file);
)
第2题:
下列程序中,要求输出一个特定文件(这里是ex2_1.java)的相关信息,包括文件的名字,相对路径以及文件的长度。请将程序补充完整。
程序运行结果如下:
name:ex2_1.java
path:ex2_1.java
length: 299
import java.io.*;
public class ex2_1{
public static void main(String[] args) {
File file2_1 = new File("ex2_1.java");
System.out.println("name:"+file2_1.____________ );
System.out.println("path:"+file2_1.____________ );
System.out.println("length:"+file2_1.____________ );
}
}
第3题:
下列语句正确的有()
第4题:
Which statements about Java code security are true?()
第5题:
编译Java程序file.java后生成的程序是()。
第6题:
Which gets the name of the parent directory file “file.txt”?()
第7题:
You have forgotten the name of binary PL/SQL library saved to the operating system. This file contains the PL/SQL constricts you created for the inventory report. For which file extension should you reach?()
第8题:
如果你想要自动加载类,下面哪种函数声明是正确的?()
第9题:
The bytecode verifier loads all classes needed for the execution of a program.
Executing code is performed by the runtime interpreter.
At runtime the bytecodes are loaded, checked and run in an interpreter.
The class loader adds security by separating the namespaces for the classes of the local file system from those imported from network sources.
第10题:
String name= File.getParentName(“file.txt”);
String name= (new File(“file.txt”)).getParent();
String name = (new File(“file.txt”)).getParentName();
String name= (new File(“file.txt”)).getParentFile();
Directory dir=(new File (“file.txt”)).getParentDir(); String name= dir.getName();
第11题:
file type
file size
file age
file name
第12题:
File file 1=new File(“c://java//example//file.txt”)
String path=”c:/java/example/”Filefile1=newFile(path,”oldfile.txt”)
File dir 1=new File(“c://java//example”)Filefile1=newFile(dir1,”oldfile.txt”)
File file 1=new File(“c:/java//example/file.txt”)
第13题:
阅读下列说明和Java代码,将应填入 (n) 处的字句写在答题纸的对应栏内。
【说明】
现欲构造一文件/目录树,采用组合(Composite)设计模式来设计,得到的类图如6—8所示:
【Java代码】
import JavA.util.ArrayList;
import JavA.util.List;(1)class AbstractFile{
protected String name;
public void printName(){System.out.println(name);}
public abstract boolean addChild(AbstractFile file);
public abstract boolean removeChild(AbstractFile file);
public abstract ListgetChildren {};
}
class File extends AbstractFile{
public File(String name)(this.name=name;}
public boolean addChild(AbstractFile file){return false;}
public boolean removeChild(AbstractFile file){return false;}
public ListgetChildren(){return (2) ;)
}
clasS Folder extends AbstractFile{
private ListchildList;
public Folder(String name){
thiS.name=name;
this.childList=new ArrayList{};
}
public boolean addChild(AbstractFile file){return childList.add(file);}
public boolean removeChild(AbstractFile file){return childList.remove(file);
public (3)getChildren(){return (4) ;)
}
public class Client{
public static void main(String[]args){
//构造一个树形的文件/目录结构
AbstractFile rootFolder=new Folder(“C:\”’);
AbstractFile compositeFolder=new Folder(”composite”);
AbstractFile windowsFolder=new Folder(”windows”);
AbstractFile file=new File(”TestComposite.java”);
rootFOlder.addChild (compositeFolder);
rootFolder.addChiid(windowsFolder);
compositeFolder.addChild(file);
//打印目录文件树
printTree(rootFolder);
}
private static void printTree(AbstractFile ifile){
ifile.PrIntName();
Listchildren:ifile.getChildren ();
if(chiidren==null)return;
for(AbstractFile file:children){(5) ;
}
}
}
该程序运行后输出结果为:
C:\
composite
TestComposite.java
Windows
第14题:
Which file characteristic cannot be used in the Cisco IronPort Data Security policies?()
第15题:
public class test { public static void main(String [] a) { assert a.length == 1; } } Which two will produce an AssertionError?()
第16题:
为文件c:/java/example/file.txt建立File对象file1可以采用()语句序列。
第17题:
Which of the following will occur if an operator types the command vi file.out?()
第18题:
You deployed a Java EE Shared Library and want to use it from an application that is also deployed on the same cluster. Which two manifest attributes must be specified at a minimum with corresponding values in the deployment descriptor of the application that requires?()
第19题:
When performing a database duplication, which duplicate database parameter would you set to ensure that the online redo logs are created in the correct location?()
第20题:
If the file exists it will be opened for editing. If the file does not exist an error message will be displayed.
If the file exists it will be opened for editing. If the file does not exist a new file with the name file.out will be created and opened for editing.
If the file exists an error message will be displayed. If the file does not exist a new file with the name file.out will be created and opened for editing.
If the file exists the operator will be asked whether to open the file or overwrite the file. If the file does not exist a new file with the name file.out will be created and opened for editing.
第21题:
<%@ include file=”head.jsp”%>
<% String url=”head.jsp”;%><%@ include file=”url”%>
<%@ include file=”head.jsp”?name=”lovo”%>
<%String companyName=”lovo”;%>%@include file”head.jsp”?name=‟companyName”%
第22题:
log_file_name_convert
convert_log_file_name
file_name_convert_log
redo_log_file_name_convert
logfile_convert_directory
第23题:
.SQL
.PLL
.PLD
.PRT