array

allocating memory

is done using new operator

string s[]=new string[3]

int[]x =new int[10]  //integer declaration

int y[]={4,5,6,7,8} //array declartion

public static void main(string s[]){

system.out.println("first  arg is " s[]);

------------------------------------------
system.out.println("first  arg is " s[5]);
---------leads to exception------------


passing parameters

java hello a b 1 2 344


we can add strings so we need to convert them to integer


Integer present(s[2]);






Comments

Popular posts from this blog

commenting in java

Running a java program