<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    JAVA題庫(kù):5道JAVA題

    module 1 – getting started
    q1.what will happen when you compile and run the following code?
    (4)
    public class myclass{
    static int i;
    public static void main(string argv[]){
    system.out.println(i);
    }
    }
    1) error variable i may not have been initialized
    2) null
    3) 1
    4) 0
    q2.which of the following will compile without error (2)(3)
    1)
    import java.awt.*;
    package mypackage;
    class myclass {}
    2)
    package mypackage;
    import java.awt.*;
    class myclass{}
    3)
    /*this is a comment */

    package mypackage;
    import java.awt.*;
    class myclass{}

    q3.what will happen if you try to compile and run the following code (1)
    public class myclass {
    public static void main(string arguments[]) {
    amethod(arguments);
    }
    public void amethod(string[] arguments) {
    system.out.println(arguments);
    system.out.println(arguments[1]);
    }
    }
    1) error can't make static reference to void amethod.
    2) error method main not correct
    3) error array must include parameter
    4) amethod must be declared with string
    q4.given the following code(2)
    public class sytch{
    int x=2000;
    public static void main(string argv[]){
    system.out.println("ms "+argv[1]+"please pay $"+x);
    }
    what will happen if you attempt to compile and run this code with the command line
    java sytch jones diggle
    1) compilation and output of ms diggle please pay $2000
    2) compile time error
    3) compilation and output of ms jones please pay $2000
    4) compilation but runtime error
    q5.you have a public class called myclass with the main method defined as follows(4)
    public static void main(string parm[]){
    system.out.println(parm[0]);
    }
    if you attempt to compile the class and run the program as follows
    java myclass hello
    what will happen?
    1) compile time error, main is not correctly defined
    2) run time error, main is not correctly defined
    3) compilation and output of java
    4) compilation and output of hello

    posted on 2006-12-27 00:24 youngturk 閱讀(442) 評(píng)論(0)  編輯  收藏 所屬分類: 筆試題

    <2006年12月>
    262728293012
    3456789
    10111213141516
    17181920212223
    24252627282930
    31123456

    導(dǎo)航

    統(tǒng)計(jì)

    公告

    this year :
    1 jQuery
    2 freemarker
    3 框架結(jié)構(gòu)
    4 口語(yǔ)英語(yǔ)

    常用鏈接

    留言簿(6)

    隨筆分類

    隨筆檔案

    文章分類

    文章檔案

    相冊(cè)

    EJB學(xué)習(xí)

    Flex學(xué)習(xí)

    learn English

    oracle

    spring MVC web service

    SQL

    Struts

    生活保健

    解析文件

    搜索

    最新評(píng)論

    閱讀排行榜

    評(píng)論排行榜

    主站蜘蛛池模板: 国产在线观a免费观看| 国产AⅤ无码专区亚洲AV| 国产精品视频白浆免费视频| 亚洲AV成人精品一区二区三区| 亚洲综合久久综合激情久久| 亚洲伊人久久综合中文成人网| 白白国产永久免费视频| 亚洲黄色免费网址| 国内精品免费视频精选在线观看| 一级看片免费视频囗交| 国产精品无码亚洲精品2021| 亚洲 欧洲 视频 伦小说| 久久精品国产亚洲av日韩| 国产∨亚洲V天堂无码久久久| 亚洲另类少妇17p| 国产午夜影视大全免费观看| 毛片高清视频在线看免费观看| 99精品国产成人a∨免费看| 青柠影视在线观看免费| 国产综合免费精品久久久| 特级毛片爽www免费版| 色屁屁在线观看视频免费| www亚洲精品久久久乳| 亚洲精品无码久久久久秋霞| 亚洲综合av一区二区三区| 91在线亚洲综合在线| 亚洲粉嫩美白在线| 亚洲国产视频久久| 亚洲国产精品久久久久秋霞小| 国产婷婷综合丁香亚洲欧洲| 亚洲一卡2卡3卡4卡国产网站| 亚洲免费福利视频| 亚洲第一页在线观看| 亚洲国产精品久久久久秋霞影院 | 久久久久久亚洲精品无码| 亚洲色无码专区一区| 亚洲日韩中文字幕无码一区| 亚洲乱妇老熟女爽到高潮的片| 亚洲精品自偷自拍无码| 在线观看亚洲网站| aa午夜免费剧场|