Tuesday, December 22, 2015

one dimensional array:

one dimensional array:
package javaapplication27;


public class OneDArray {
    public static void main(String[] args) {
     
   
    int days[]=new int[12];//declaring array
    days[0]=1;
    days[1]=10;
    days[2]=112;
    days[3]=12;
    days[4]=13;
   
        System.err.println(days[0]);
   
}
}


The output is:
run:
1
BUILD SUCCESSFUL (total time: 1 second)

Related Posts:

  • Character Extraction Character Extraction: 2)getChars() If you want to extract more than one character at a time,you can use the getChars() method. It has general form… Read More
  • Access Protection in java: Access Protection in java: private     No modifier protected public  Same class … Read More
  • replace() method Modifying a String: replace();     The replace method is used to replace the one character of string.It has the general form:   &nbs… Read More
  • Character Extraction Character Extraction: 1) charAt() charAt() method is used to extract single character from String.Here is a small program to demonstrate chatAt() … Read More
  • Fibonacci Using Recusion method Fibonacci Using Recusion method: package diamond; import static diamond.Fibonacci.fibonacciRecusion; public class FibonacciDemo {     pu… Read More

0 comments:

Post a Comment