0
null
false
编译错误
第1题:
A.0
B.null
C.false
D.编译错误
第2题:
设有如下的记录类型: Type Student Number As String Name As String Age As Integer End Sub 则能正确引用该记录类型变量的代码是( )。
A.Student.name=""
B.Dim s As Students.name=“张红”
C.Dims As Tye Students.name=“张红”
D.DimsAsTypes.name=“张红”
第3题:
阅读下列XML文档,回答问题1至问题4,将解答填入对应栏内。
【XML文档】
<? Xml version= "1.0" encoding=" GB2312 "?>
<!—以下是文档的主体部分→
<college>
<title>希赛教育</title>
<head>软考培训部</Head>
<Stu_Num unit="人">2</Stu_Num>
<Student>
<Name>张网管</Name>
<Age>21 </Age>
<Sex>男</Sex>
<Class>软考2班</Class>
</Student>
<Student>
<Name>李软设</Name>
<Age>20</Age>
<Sex>女</Sex>
<Class>软考3班</Class>
</Student>
</College>
与HTML相比,XML具有哪些特点?
第4题:
阅读以下说明和Java 码,将应填入(n)处的字名写在的对应栏内。
[说明] 编写一个学生类Student,要求:
(1) 学生类Student 属性有:
id: long 型,代表学号
name: String类对象,代表姓名
age: int 型,代表年龄
sex: boolen 型,代表性别(其中:true 表示男,false 表示女)
phone: String 类对象,代表联系电话
(2) 学生类Student 的方法有:
Student (long i,String n,int a,boolean s,String p)
:有参构造函数,形参表中的参数分别初始化学号、姓名、
年龄、性别和联系电话。
int getAge ():获取年龄作为方法的返回值。
boolean getSex ():获取性别作为方法的返回值。
String getPhone ():获取联系电话作为方法的返回值。
public String to String ():以姓名:性别:学号:联系电话的形式作为方法的返
import java. applet. Applet;
import java. awt.* ;
public class Student extends Applet {
long id;
String name, phone;
int age;
boolean sex;
Student(long i, String n, int a, boolean s, String p)
{
id=i;
name = n;
age = a;
sex= s;
phone = p;
{
public void paint( Graphics g)
{
Student x= new Student (5000," xiaoliu" , 89, true, " 8989898" );
(1);
(2)
g. drawstring( x. getPhone( ), 140,140);
}
int getAge( )
{ return age; }
boolean getsex ( )
{ return sex; }
String getPhone( )
{ return phone; }
String ToString( )
{
(3)
}
}
第5题:
以下scanf函数调用语句中对结构体变量成员的不正确引用的是()。 struct node{ char name[20]; int age; int sex; }student[5],*p; p=student;
第6题:
执行以下代码后,下面哪些描述是正确的() public class Student{ private String name = “Jema”; public void setName(String name){ this.name = name; } public String getName(){ return this.name; } public static void main(String[] args){ Student s; System.out.println(s.getName()); } }
第7题:
类Student的声明如下: package com.school class Student{ String name; int age; Student(String name,int age){ //code } void study(String subject){ / /code } } 正确调用方法study(String subject)的是哪项?()
第8题:
对于如下代码,描述正确的是哪项?() class Student{ public static void main(String[] args){ Student student=new Student(); } }
第9题:
类Student代码如下:D class Student{ String name; int age; Student(String nm){ (构造方法) name = nm; } } 执行语句Student stu = new Student()后,字段age的值是哪项?()
第10题:
scanf(“%s”,student[0].name);
scanf(“%d”,&student[0].age);
scanf(“%d”,&(p->sex));
scanf(“%d”,p->age);
第11题:
0.0f
numll
false
0
0.0
第12题:
Stu.bir.year=1988;
Stu.year=1988;
Stu. Birthday.year=1988;
Student. Birthday.year=1988;
第13题:
设有如下的记录类型: TypeStudent number As String name AS String age As Integer End Type 则正确引用该记录类型变量的代码是( )。
A.Student.name="张红"
B.Dim s As Student s.name="张红"
C.Dim s As Type Student s.name="张红"
D.Dim s As Type s.name="张红"
第14题:
有如下语句: Type Student Name As String Age As Integer Sex As String End Type Dim Stu As Student With Stu .Name="张红" .Age=22 .Sex="女" End With 执行Print Stu.Age语句后的结果是
A.张红
B.22
C.“女”
D.Age
第15题:
有如下用户定义类型及操作语句: Tyoe Student SNo As String Sname As String SAge As Integer End Type Dim Stu As Student With Stu SNo=”200609001” SName=”陈果果“ A ge=19 End With 执行MsgBox Stu,Age 后,消息框输出结果是 【13】
第16题:
设有如下的记录类型: Type Student number As String name As String age As Integer End Type 则正确引用该记录类型变量的代码是______。
A.StUdent.name=""
B.Dim s As StUdent s.name="张红"
C.Dim s As Type Student s.name="张红"
D.Dim s As Type s.name="张红"
第17题:
有下列语句: struct Birthday{public int year; public int month; public int day;}; struct Student{ int no; string name; int age; public Birthday bir; }; …… Student Stu; 如果要把Stu的出生年份赋值为1988,正确的语句是()
第18题:
类Student代码如下: class Student{ String name; int age; Student(String nm){ name = nm; } } 执行语句Student stu = new Student()后,字段age的值是哪项?()
第19题:
类 Student 中字段mark的缺省值是哪项?() Class Student{ String name; int age; float market; ········· }
第20题:
对于如下代码,描述正确的是哪项? () class Student{ public static void main(String[] args){ Student student = new Student(); } }
第21题:
0
null
false
编译错误
第22题:
输出null
第10行编译报错
第11行编译报错
输出Jema
第23题:
0
null
false
编译错误
第24题:
Student stu = new Student(“Tom”,23); stu.study(“数学”);
Student.study(“数学”);
Student stu = new Student(“Tom”,23); stu.study();
Student stu = new Student(“Tom”,23); String result=stu.study(“数学”);