存在如下资源方法,如果希望客户浏览器得到与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")
存在如下资源方法,如果希望客户浏览器得到与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
相关考题:
如下程序的输出结果是______。 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?()ACAT5 connectors have locking tabsBCAT5 and CAT6 use the same connectorsCCAT6 supports three different wiring standardsDCAT6 connectors are longer for better contact
单选题______ is from India.AThe mayor’s of New York’s catBThe mayor’s cat of New York’sCThe mayor of New York’s catDThe 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; 后下列哪项是正确的?()APetp=(Pet)c运行错误BPetp=(Pet)c编译错误CPetp=(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(); 后输出的内容是哪项?()APet Pet PetBCat Cat CatCCat Dog PetDCat 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(); } } 结果为:()Acat5BcableCcable cat5Dcat5 cable