网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
存在如下资源方法,如果希望客户浏览器得到与Cat对应的JSON数据,可以使用的注解是 public Cat aCat(){ return new Cat("乌云踏雪"); }
A.@Produces("text/html;charset=UTF-8")
B.@Produces("image/jpeg;charset=UTF-8")
C.@Produces("application/octet-stream;charset=UTF-8")
D.@Produces("application/json;charset=UTF-8")
参考答案和解析
B
更多 “存在如下资源方法,如果希望客户浏览器得到与Cat对应的JSON数据,可以使用的注解是 public Cat aCat(){ return new Cat("乌云踏雪"); }A.@Produces("text/html;charset=UTF-8")B.@Produces("image/jpeg;charset=UTF-8")C.@Produces("application/octet-stream;charset=UTF-8")D.@Produces("application/json;charset=UTF-8")” 相关考题
考题
如下程序的输出结果是______。 include using namespace std; class Pet{ char nam
如下程序的输出结果是______。include<iostream>using namespace std;class Pet{char name[10];public:Pet(char*nanle){strcpy(this->name,name);}const char*getName( )const{return name;}virtual void call( )eonst=0;};class Dog:public Pet{public:Dog(char*name):Pet(name){ }void call( )eonst{cout<<"汪汪叫";}};class Cat:public Pet{public:Cat(char*name):Pet(name){ }void call( )const{eout<<"喵喵叫";}};int main( ){Pet*petl=new Dog("哈克"),*pet2=new Cat("吉米");eout<<petl->getName( );petl->call( );eout<<endl;cout<<pet2->getName( );pet2->call( );eout<<endl;return 0;}
考题
有如下程序: include using namespace std; class Pet{ char name[10]; public: Pet(c
有如下程序:include<iostream>using namespace std;class Pet{char name[10];public:Pet(char*name){strcpy(this->name,name);}const char*getName()const {return name;}virtual void call()const=0;};class Dog:public Pet{public:Dog(char*name):Pet(name){}void call()const{cout<<"汪汪叫":}};class Cat:public Pet{public:Cat(char*name):Pet(name){}void call()const{cout<<"喵喵叫";}};int main(){Pet*pet1=new Dog("哈克"),*pet2=new Cat("吉米");cout<<pet1->getName();pet1->call();cout<<end1;cout<<pet2->getName();pet2->call();cout<<end1;return 0;}程序的输出结果是______。
考题
public class Pet{} public class Cat extends Pet{} 执行代码 Cat c = new Cat(); Pet p = (Pet)c; 下列哪项是正确的? A、Pet p = (Pet)c正常执行B、Pet p = (Pet)c编译错误C、Pet p = (Pet)c运行错误D、以上都不对
考题
11. class Animal { public String noise() { return “peep”; } } 12. class Dog extends Animal { 13. public String noise() { return “bark”; } 14. } 15. class Cat extends Animal { 16. public String noise() { return “meow”; } 17. } ..... 30. Animal animal = new Dog(); 31. Cat cat = (Cat)animal; 32. System.out.printIn(cat.noise()); What is the result?() A、 peepB、 barkC、 meowD、 Compilation fails.E、 An exception is thrown at runtime.
考题
现有: class Cat { Cat(int c) { System.out.print("cat" + c + " "); } } class SubCat extends Cat { SubCat(int c) { super(5); System.out.print("cable "); } SubCat() { this(4); } public static void main(String [] args) { SubCat s = new SubCat(); } } 结果为:() A、cat5B、cableC、cable cat5D、cat5 cable
考题
现有: public class Pet() public class Cat extends Pet{) 执行代码 Cat c- new Cat(); Pet p= (Pet)c; 后下列哪项是正确的?() A、 Pet p=(Pet)c运行错误B、 Pet p=(Pet)c编译错误C、 Pet p= (Pet)c止常执行D、以上都不对
考题
public class Pet{ public void speak(){ System.out.print(“ Pet ”); } } public class Cat extends Pet{ public void speak(){ System.out.print(“ Cat ”); } } public class Dog extends Pet{ public void speak(){ System.out.print(“ Dog ”); } } 执行代码 Pet[] p = {new Cat(),new Dog(),new Pet()}; for(int i=0;i〈p.length;i++) p[i].speak(); 后输出的内容是哪项?() A、Pet Pet PetB、Cat Cat CatC、Cat Dog PetD、Cat Dog Dog
考题
下面哪个命令可以查看网卡的中断?()A、cat/proc/ioportsB、cat/proc/interruptsC、cat/proc/memoryinfoD、which interrupts
考题
单选题Which of the following is correct about differences in CAT5 and CAT6 connectors?()A
CAT5 connectors have locking tabsB
CAT5 and CAT6 use the same connectorsC
CAT6 supports three different wiring standardsD
CAT6 connectors are longer for better contact
考题
单选题______ is from India.A
The mayor’s of New York’s catB
The mayor’s cat of New York’sC
The mayor of New York’s catD
The mayor’s cat of New York
考题
单选题11. class Animal { public String noise() { return “peep”; } } 12. class Dog extends Animal { 13. public String noise() { return “bark”; } 14. } 15. class Cat extends Animal { 16. public String noise() { return “meow”; } 17. } ..... 30. Animal animal = new Dog(); 31. Cat cat = (Cat)animal; 32. System.out.printIn(cat.noise()); What is the result?()A
peepB
barkC
meowD
Compilation fails.E
An exception is thrown at runtime.
考题
单选题现有: public class Pet() public class Cat extends Pet{) 执行代码 Cat c- new Cat(); Pet p= (Pet)c; 后下列哪项是正确的?()A
Pet p=(Pet)c运行错误B
Pet p=(Pet)c编译错误C
Pet p= (Pet)c止常执行D
以上都不对
考题
单选题现有: public class Pet( ) public class Cat extends Pet{) 执行代码 Cat c- new Cat( ); Pet p= (Pet)c; 后下列哪项是正确的?()A
Petp=(Pet)c运行错误B
Petp=(Pet)c编译错误C
Petp=(Pet)c止常执行D
以上都不对
考题
单选题public class Pet{ public void speak(){ System.out.print(“ Pet ”); } } public class Cat extends Pet{ public void speak(){ System.out.print(“ Cat ”); } } public class Dog extends Pet{ public void speak(){ System.out.print(“ Dog ”); } } 执行代码 Pet[] p = {new Cat(),new Dog(),new Pet()}; for(int i=0;i〈p.length;i++) p[i].speak(); 后输出的内容是哪项?()A
Pet Pet PetB
Cat Cat CatC
Cat Dog PetD
Cat Dog Dog
考题
单选题现有: class Cat { Cat (int c) {System.out.print {"cat"+c+" "); } } class SubCat extends Cat { SubCat (int c){super (5); System.out.print ("cable");} SubCat() { this (4); } public static void main (String [] args) { SubCat s= new SubCat(); } } 结果为:()A
cat5B
cableC
cat5 cableD
cable cat5
考题
单选题现有: class Cat { Cat(int c) { System.out.print("cat" + c + " "); } } class SubCat extends Cat { SubCat(int c) { super(5); System.out.print("cable "); } SubCat() { this(4); } public static void main(String [] args) { SubCat s = new SubCat(); } } 结果为:()A
cat5B
cableC
cable cat5D
cat5 cable
热门标签
最新试卷