单选题创建一个名为student的新类,保存新类的类库名称是mylib,新类的父类是Person,正确的命令是( )。ACREATE CLASS mylib OF student As PersonBCREATE CLASS student OF Person As mylibCCREATE CLASS student OF mylib As PersonDCREATE CLASS Person OF mylib As student
单选题
创建一个名为student的新类,保存新类的类库名称是mylib,新类的父类是Person,正确的命令是( )。
A
CREATE CLASS mylib OF student As Person
B
CREATE CLASS student OF Person As mylib
C
CREATE CLASS student OF mylib As Person
D
CREATE CLASS Person OF mylib As student
参考解析
解析:
使用CREATE CLASS命令可以创建新的类库,基本格式为:CREATE CLASS新类名OF新类库名As父类。
使用CREATE CLASS命令可以创建新的类库,基本格式为:CREATE CLASS新类名OF新类库名As父类。
相关考题:
已建立一个名为teacher的类,保存该类的类库名称是mylib,则删除该类正确的命令是( )。A)REMOVE CLASS mylib OF teacherB)REMOVE CLASS teacher OF mylibC)DELETE CLASS mylib OF teacherD)DELETE CLASS teacher OF rnylib
( 30 )下列代码声明了 3 个类class Person{};class Student:public Person{};class Undergraduate:Student{};下列关于这些类之间关系的描述中,错误的是A )类 Person 是类 Undergraduate 的基类B )类 Undergraduate 从类 Student 公有继承C )类 Student 是类 Person 的派生类D )类 Undergraduate 是类 Person 的派生类
下列代码段声明了3个类:class Person();class Student:public Person{};class Undergraduate:Student{};下列关于这些类之间关系的描述中,错误的是( )。A.类Person是类Undergraduate的基类B.类Undergraduate从类Student公有继承C.类Student是类Person的派生类D.类Undergraduate是类Person的派生类
A developer is creating a class Book that needs to access class Paper.The Paper class is deployed in a JARnamedmyLib.jar.Whichthree,taken independently,will allow the developer to use the Paper class while compiling the Book class?()A.The JAR fileis located at$JAVA_HOME/jre/classes/myLib.jar.B.The JAR fileis located at$JAVA_HOME/jre/lib/ext/myLib.jar.C.TheJ AR fileis located at/foo/myLib.jar and aclasspath environment variable is set that includes /foo/myLib.jar/Paper.class.D.The JAR fileis located at/foo/myLib.jar and a classpath environment variable is set that includes/foo/myLib.jar.E.The JAR file is located at/foo/myLib.jar and the Book class is compiled using javac-cp/foo/myLib.jar/Paper Book.java.F.The JAR file is located at/foo/myLib.jar and the Book class is compiled using javac-classpath/foo/myLib.jar Book.java.
下列程序运行后的输出结果是( )。#include#includeusing namespace std;class Person{public:Person(string n):name(n) { coutprivate:int year,month,day;};class Student:public Person{public:Student(string n,int y,int m,int d,char c):birthday(y,m,d),sex(c),Person(n) { coutA. SB.PSC.DPSD.PDS
创建一个名为student的新类,保存新类的类库名称是mylib,新类的父类是Person,正确的命令是A.CREATE CLASS mylib OF student As PemonB.CREATE CLASS student OF Pe~on As mylibC.CREATE CLASS student 0F mylib As Pe~onD.CREATE CLASS Person OF mylib As student
创建一个名为myteacher的新类,保存新类的类库名称是mylib,新类的父类是Teacher,正确的命令是 ( )。A. CREATE CLASS mylib OF myteacher AS TeacherB. CREATE CLASS myteacher OF Teacher AS mylibC. CREATE CLASS myteacher OF mylib AS TeacherD. CREATE CLASS Teacher OF mylib AS myteacher
●以下的SQL 99语句,Student与Person之间的关系是 (62) 。CREATE TYPE Person(name char(20),address varchar(50));CREATE TYPE Student(under Person(degree char(20)department char(20));(62)A.类型继承B.类型引用C.表继承D.无任何关系
创建一个名为student的新类,保存新类的类库名称是mylib,新类的父类名是Person,正确的命令是( )。A.CREATE CLASS mylib OF student AS PcrsonB.CREATE CLASS student OF Person AS mylibC.CREATE CLASS student OF mylib AS PersonD.CREATE CLASS Person OF mylib AS student
下列代码段声明了3个类:classPerson{);classStudent:publicPerson{};classUndergraduate:Student{);下列关于这些类之间关系的描述中,错误的是( )。A.类Person是类Undergraduate的基类B.类Undergraduate从类Student公有继承C.类Student是类Person的派生类D.类Undergraduate是类Person的派生类
设有下面两个类的定义。 class Person { long id; // 身份证号 String name; // 姓名 } class Student extends Person { int score; // 入学总分 } intgetScore() { return score;} } 则类Person和类Student的关系是? } A.包含关系B.继承关系C.关联关系D.上述类定义有语法错误
设有下面两个类的定义: class Person{ long id;// 身份证号 String name://姓名 } class Student extends Person{ int score://成绩 int getScore( ){ return score; } } 则类Person和类Student的关系是( )。A.包含关系B.继承关系C.关联关系D.无关系
要关闭当前处于打开状态的类库文件mylib,可以使用命令( )。A)RELEASE CLASSLIB mylibB)RELEASE CLASS mylibC)CLOSE CLASS mylibD)CLOSE CLASSLIB mylib
( 33 ) 创建一个名为 student 的新类 , 保存新类的类库名称是 mylib, 新类的 父 类是 P erson, 正确的命令是A ) CREATE CLASS mylib OF student A s P ersonB ) CREATE CLASS student OF P erson A s mylibC ) CREATE CLASS student OF mylib A s P ersonD ) CREATE CLASS P erson OF mylib A s student
类Student代码如下: class Student{ String name; int age; Student(String nm){ name = nm; } } 执行语句Student stu = new Student()后,字段age的值是哪项?() A、 0B、 nullC、 falseD、 编译错误
类Teacher和Student是类Person的子类; Person p; Teacher t; Student s; //p, t and s are all non-null. if(t instanceof Person) { s = (Student)t; } 最后一句语句的结果是:()A、 将构造一个Student对象;B、 表达式是合法的;C、 表达式是错误的;D、 编译时正确,但运行时错误。
在SQL Sever中,创建数据库student,使用的语句是()。A、CREATE TABLE studentB、CREATE VIEW studentC、CREATE PROC studentD、CREATE DATABASE student
下列有关类声明的代码片段,哪一项是正确的?() A、 import java.sql.*; package school; class Student{ }B、 package school; import java.sql.*; class Student{ }C、 package school; class Student{ } import java.sql.*;D、 package school; import java.sql.*;private String name; class Student{ }
对于如下代码,描述正确的是哪项?() class Student{ public static void main(String[] args){ Student student=new Student(); } } A、new Student()创建了Student对象的一个实例B、Student student声明了对象Student的一个引用C、class Student声明了一个类D、new Student()创建了一个类E、Student student 声明了一个类
A developer is creating a class Book, that needs to access class Paper. The Paper class is deployed in a JAR named myLib.jar. Which three, taken independently, will allow the developer to use the Paper class while compiling the Book class?()A、The JAR file is located at $JAVA_HOME/jre/classes/myLib.jarB、The JAR file is located at $JAVA_HOME/jre/lib/ext/myLib.jarC、The JAR file is located at /foo/myLib.jar and a classpath environment variable is set that includes /foo/myLib.jar/Paper.classD、The JAR file is located at /foo/myLib.jar and a classpath environment variable is set that includes /foo/myLib.jarE、The JAR file is located at /foo/myLib.jar and the Book class is compiled using javac –cp /foo/myLib.jar/Paper Book.javaF、The JAR file is located at foo/myLib.jar and the Book class is compiled using javac –classpath /foo/myLib.jar Book.java
对于如下代码,描述正确的是哪项? () class Student{ public static void main(String[] args){ Student student = new Student(); } } A、Student student 声明了一个类B、new Student()创建了Student 对象的一个实例C、Student student 声明了对象Student 的一个引用D、class Student 声明了一个类
A developer is creating a class Book, that needs to access class Paper. The Paper class is deployed in a JAR named myLib.jar. Which three, taken independently, will allow the developer to use the Paper class while compiling the Book class?()A、The JAR file is located at $JAVA_HOME/jre/classes/myLib.jar.B、The JAR file is located at $JAVA_HOME/jre/lib/ext/myLib.jar..C、The JAR file is located at /foo/myLib.jar and a classpath environment variable is set that includes /foo/myLib.jar/Paper.class.D、The JAR file is located at /foo/myLib.jar and a classpath environment variable is set that includes /foo/myLib.jar.E、The JAR file is located at /foo/myLib.jar and the Book class is compiled using javac -cp /foo/myLib.jar/Paper Book.java.F、The JAR file is located at /foo/myLib.jar and the Book class is compiled using javac -d /foo/myLib.jar Book.javaG、The JAR file is located at /foo/myLib.jar and the Book class is compiled using javac -classpath /foo/myLib.jar Book.java
多选题对于如下代码,描述正确的是哪项?() class Student{ public static void main(String[] args){ Student student=new Student(); } }Anew Student()创建了Student对象的一个实例BStudent student声明了对象Student的一个引用Cclass Student声明了一个类Dnew Student()创建了一个类EStudent student 声明了一个类
多选题对于如下代码,描述正确的是哪项? () class Student{ public static void main(String[] args){ Student student = new Student(); } }AStudent student 声明了一个类Bnew Student()创建了Student 对象的一个实例CStudent student 声明了对象Student 的一个引用Dclass Student 声明了一个类
单选题下列有关类声明的代码片段,哪一项是正确的?()A import java.sql.*; package school; class Student{ }B package school; import java.sql.*; class Student{ }C package school; class Student{ } import java.sql.*;D package school; import java.sql.*;private String name; class Student{ }
单选题类Teacher和Student是类Person的子类; Person p; Teacher t; Student s; //p, t and s are all non-null. if(t instanceof Person) { s = (Student)t; } 最后一句语句的结果是:()A 将构造一个Student对象;B 表达式是合法的;C 表达式是错误的;D 编译时正确,但运行时错误。