java දන්නා ලොකු අයියල එන්න

DooA

Well-known member
  • Jun 22, 2011
    5,202
    773
    113
    ආගිය අතක් නැත
    java දන්නා ලොකු අයියල එන්න

    ඔන්න මචං ඉතින් අපේ clz එකෙත් දැන් java පටන් ගත්ත.

    අපි ඉතින් තාම චුටි කොල්ලොනේ. මේකේ ඉන්න ලොකු අයියලා ටික ලග තියෙනවද දන්නේ නෑ. පොඩි පොඩි ලොජික් exercises එහෙම. ඔය දෙන්නේ තරු රටා හදන්නයි, ඉලක්කමක් ඔත්තේද ඉරට්ටේද කියලා හොයලා array වලට දාන්නයි. ඒ වගේ ඒවා. පොඩි පොඩි කිව්වට චුටිම චුටි ඒවා.

    දැනට කරලා තියෙන්නේ

    if/else
    loop (while/for)
    array තව පොඩි පොඩි ඒවා කරා.


    මෙතනින් එහාට යන්න කලින් ටිකක් මොළේ හදාගන්නයි බැලුවේ.

    එහෙම exercise තියෙනවනම් මෙතන දාන්නකෝ.

    එත් එක්කම පල්ලෙහා තියෙන enhanced for loop එකේ වරදත් කියලම යන්න.


    int x=new x[10];

    for(int y=x){

    System.out.print(y);
    }

    :yes::yes::yes::yes::yes::yes::yes::yes::yes::yes::yes::yes::yes::yes::yes:
     

    banduelakiri

    Junior member
  • Dec 8, 2007
    33
    11
    8
    Java learners

    Hi,
    I started my ICT with JAVA in 2004 . Have eight years of industry exp upto now.
    Good and more demanding language. Keep in touch with java..Seach tutorials sites and get knowledge from them.
    tutorialspoint.com
    allphalabs

    Congraz !!
     

    Miami-Vice

    Well-known member
  • Apr 19, 2010
    22,557
    14,500
    113
    bump

    public int myArray[] = new int[35];

    for (int myValue : myArray)
    {
    System.out.println(myValue);
    }
     

    MihiCherub

    Well-known member
  • Sep 14, 2009
    18,944
    1
    9,746
    113
    Gampaha
    If we list all the natural numbers below 10 that are multiples of 3 or 7, we get 3,6,7 and 9. The sum of these multiples is 25.
    Find the sum of all the multiples of 3 or 7 below 1000.
     
    • Like
    Reactions: DooA