首页 > 职业资格考试> 房地产经纪人协理
题目内容 (请给出正确答案)
[主观题]

public class turnString{public static void main(String args[]){String s=”testonly”;for(i

public class turnString{public static void main(String args[]){String s=”testonly”;for(i

public class turnString

{

public static void main(String args[])

{

String s=”testonly”;

for(int i=s.length()-1;i>=0;i--) System.out.print(s.charAt(i));

System.out.println();

}

}

查看答案
答案
收藏
如果结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能还需要:
您的账号:
发送账号密码至手机
发送
安装优题宝APP,拍照搜题省时又省心!
更多“public class turnString{public…”相关的问题
第1题
Public class Test{Public static void main(String args[]){System.out.println((3>2)?4:5);}
Public class Test{Public static void main(String args[]){System.out.println((3>2)?4:5);}

Public class Test

{

Public static void main(String args[])

{

System.out.println((3>2)?4:5);

}

}

其运行结果是()

A、2

B、3

C、4

D、5

点击查看答案
第2题
已知类定义如下,其中Shape 为基类, Circle 和Rectangle 分别Shape 的直接派生类, Square 为R
ectangle 的直接派生类和Shape 的间接派生类。请模仿Rectangle 类,写出Circle 类的所有成员函数。

/****************** 文件shape.h*************************/

const float PI=3.14159f; // 定义圆周率常量

class Shape // 几何图形抽象类

{

public:

virtual float GetPerimeter()=0; // 纯虚函数,计算周长

virtual float GetAre()=0; // 纯虚函数,计算面积

};

class Rectangle: public Shape // 矩形类

{

public:

Rectangle (float len,float wid):length(len),width(wid){}

~Rectangle (){}

float GetPerimeter() {return 2*(length width);} // 计算矩形周长

float GetAre() {return length*width;} // 计算矩形面积

private:

float length, width; // 矩形的长和宽

};

class Circle: public Shape // 圆类

{

public: // 在下面编写每个成员函数

private:

float rad; // 圆的半径

};

class Square: public Rectangle // 正方形类

{

public:

Square(float len): Rectangle(len,len){}

~Square(){}

};

点击查看答案
第3题
关键字()定义允许在类外部使用的成员数据和成员函数

A.virtual

B.class

C.public

D.private

点击查看答案
第4题
关于下列程序段的输出结果,说法正确的是()public class MyClass{ static int i;public static void main(String argv[]){System.out.println(i) } }

A.null

B.有错误,变量i没有初始化

C.1

D.0

点击查看答案
第5题
有如下程序:Using system;Class Example1{ Public Static void main(){ Int x=1

A.Writeline(“a={0},b={1}”,a,b);}}的输出结果是()

B.a=2,b=1

C.a=1,b=1

D.a=1,b=0

E.a=2,b=2

点击查看答案
第6题
写出以下程序的运行结果。

public class Class1

{

public static void main(String args[])

{

int n=6,sum=0;

for(int k=1;k<=n;k++)

{

if (n%k==0)

sum+=k;

}

System.out.println(sum);

}

}

点击查看答案
第7题
有以下程序: public class ConstOver { public ConstOver (int x, int y, int z) { } } 下面

A.protected int ConstOver (){ }

B.private ConstOver (int z, int y, byte x) { }

C.public object ConstOver (int x, int y, int z) { }

D.public void ConstOver (byte x, byte y, byte z) { }

点击查看答案
第8题
阅读下面的程序,程序执行后,运行结果为()public class test {public static void main(String args[]) {int i; float f =2.3f; double d =2.7;i = ((int)Math.ceil(f)) * ((int)Math.round(d))System.out.println(i) }}

A.9

B.5

C.6

D.6.1

点击查看答案
第9题
下面的程序创建了一个文件输出流对象,用来向文件test.txt中输出数据,假设程序当前目录下不存
在文件test.txt ,编译下面的程序Test.java 后,将该程序运行3次,则文件test.txt 的内容是()

import java.io.*;

public class Test {

public static void main(String args[]) {

try {

String s = "ABCDE" byte b[]=s.getBytes()

FileOutputStream file =

new FileOutputStream("test.txt", true)

file.write(b) file.close() }

catch(IOException e) {

System.out.println(e.toString()) }

}

}

A、ABCABC

B、ABCDE

C、Test

D、ABCDEABCDEABCDE

点击查看答案
第10题
When Bill de Blasio ran for New York City mayor last year, he promised to end a controversial (有争议的), citywide cell-phone ban(禁令)in public schools

When Bill de Blasio ran for New York City mayor last year, he promised to end a controversial (有争议的), citywide cell-phone ban(禁令)in public schools, which is not equally enforced in all schools. Now, under his leadership, the city is preparing to end the ban. It will be replaced by a policy that allows phones inside schools but tells students to keep them packed away during class.

Many schools have a rule about enforcing the ban that says, “If we don't see it, we don't know about it.” That means teachers are OK with students bringing in cell phones, as long as they stay out of sight and inside bags and pockets.

But at the 88 city schools with metal detectors, die ban has been strictly enforced. The detectors were installed to keep weapon out of schools,but the scanners(扫描器)can also detect cell phones. So students at these schools must leave their phones at home or pay someone to store it for them.

The ban was put into place in 2007 under mayor Michael Bloomberg. Ending the ban will also likely end an industry that has sprung up near dozens of the schools that enforce the ban. Workers in vans(厢式货车)that resemble food tracks store teens' cell phones and Other devices for a dollar a day,

Critics of the ban say cell phones are important safety devices for kids during an emergency. They also say that enforcement of the ban is uneven and discriminatory. Where the ban is enforced, it puts a disadvantage on students who can't afford to pay to store their phones.

Before putting an official end to the cell-phone ban, city education officials are working on creating a new policy. It will include rules about not using the phones during class or to cheat on tests.

1. Which of the following is the main idea of the passage?

A. New York City will give financial aid to poor students.

B. New York City plans to restrict cell phone use in libraries.

C. New York City plans to install metal detectors in all public schools.

D. New York City will soon end a ban on cell phones in schools.

2. Students pay___________ a day to leave their cell phones in a van parked near their school.

A. a dollar

B. two dollars

C. five dollars

D. ten dollars

3. Metal detectors were installed in 88 city schools, mainly to keep ___________ out of schools.

A. cell phones

B. weapons

C. alcohol

D. drugs

4. The word discriminatory in Paragraph 5 probably means ___________.

A. necessary

B. tough

C. strict

D. unfair

5. According to the passage, which of the following statements is TRUE?

A. After the cell-phone ban is ended, students can use their phones during class.

B. The cell-phone ban is equally enforced in all public schools.

C. The cell-phone ban was put into place in 2008 under Mayor Bill de Blasio.

D. A phone-storage industry has appeared outside the 88 metal-detector campuses.

点击查看答案
第11题
Some of the students in his class seem ______ to do their assignments.A.boringB.interestin

Some of the students in his class seem ______ to do their assignments.

A.boring

B.interesting

C.tiring

D.unwilling

点击查看答案
退出 登录/注册
发送账号至手机
密码将被重置
获取验证码
发送
温馨提示
该问题答案仅针对搜题卡用户开放,请点击购买搜题卡。
马上购买搜题卡
我已购买搜题卡, 登录账号 继续查看答案
重置密码
确认修改