freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內容

java期末考試試卷及答案-wenkub.com

2025-06-21 18:37 本頁面
   

【正文】 } publicdoublegetArea()//1分 {returnwidth*height。}classRectangleimplementsShapeArea{ doublewidth,height。包含接口ShapeArea,類Circle、Rectangle、Test,具體要求如下: ⑴接口ShapeArea: ①接口方法doublegetArea():求一個形狀的面積doublegetPerimeter():求一個形狀的周長⑵類Rectangle: 實現(xiàn)ShapeArea接口,并有以下屬性和方法:① 屬性width:double型,表示長方形的寬度height:double型,表示長方形的長度② 方法Rectangle(doublew,doubleh):構造函數(shù)toString():輸出矩形的描述信息,如“width=,height=,perimeter=,area=”⑶Test類作為主類要完成測試功能① 生成Rectangle對象②調用對象的toString方法,輸出對象的描述信息publicclassTest{//主類定義2分 publicstaticvoidmain(Stringargs[]) { Rectangler=newRectangle(1,2)。 }。① // ②//html/htmlimport .*。 i () 。 while(()) (()+ )。 i 2。}}12. 以下程序段的輸出結果為 1 v0 v1 1 vo 。 String s2。import .*。(ch)。 } void crunch(String s){ (“String”)。 }}public class Cat extends Animal { Cat() { (Cat )。 (“String is:”+s)。public class AboutFile{ public static void main(String[ ] args){ BufferedReader b=new BufferedReader (new InputStreamReader())。}else{ s1=s1+(c)。amp。i++) { c=(i)。 char c。 st=new StaticTest()。 StaticTest() { y++。}public static void main(String[ ] args){ new Second( )。 }} 5.閱讀以下程序,寫出輸出結果。 } void testOverload(String s){ (“String”)。 i++) ((i) + )。 ()。 i++) (s[i])。 s[1]=new String(str2)。Str0str1str2 str0str2import .*。class FileIODemo{ public static void main(String[ ] args) throws IOException{ int b。 i++ ) (a[i]+ )。 a[i] = a[k]。 for ( j = i 。 int a[ ] = {1,3,2,5,4}。Float t=new Float()。1. class StaticStuff2. { 3. static int x;4. static { x+=5;}5. public static void main(String args[ ])6. {7. (“x=” + x)。}4. }A、編譯通過運行無異常 B、編譯通過但運行時出錯C、行2出錯,不能成功編譯 D、不能成功編譯,行3出錯22.有以下程序片段,下列哪個選項不能插入到行1。C、a和b都是整數(shù)類對象并且值相等。 b = (“123”).intValue()。 B、import .* 。m15. Java application中的主類需包含main方法,main方法的返回類型是什么?( D )A、int B、float C、double D、
點擊復制文檔內容
規(guī)章制度相關推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1