[b:1drafz2v][u:1drafz2v]Reason for this issue:[/u:1drafz2v][/b:1drafz2v]You declared object array as "String" and trying to pass int value
You are encountering this issue, as you are passing integer value(1234) in Str[1]
change this value as
Str[1]="1234"
Anyways, wait for reply from Ashish team
Sir thanks for the reply.
Sir if we want to give every item in string, then we can use directly string array, then what will be the use of an "Object" ?
I believe an array object should store and type of data type items.
As u said we can use the below
String arr[]=new String[5];
arr[0]="123";
Then what is the use of below syntax, when can we use this
Object str[]=new Object[4];
Please clarify
By using below syntax, you can declare any variable (string or int)
[b:ckcokkwb]Reason[/b:ckcokkwb]:[b:ckcokkwb]You can use Object for storing any type of value for e.g. int, float, String[/b:ckcokkwb]
Object str[]=new Object[4];
str[0]="Test"
str[1]=1234;
str[2]=2345;
str[3]="String";
Anyways, wait for a better solution from Ashish team.
[quote="veerus.scsvmv@gmail.com":5j85qano]Then what is the use of below syntax, when can we use this
Object str[]=new Object[4];[/quote:5j85qano]
An object is an instance of a class in Java. we can declare any datatype by using above syntax.
str[0]="Username"
str[1]=12;
str[2]=234.56
str[3]="user@gmail.com"
[quote="veerus.scsvmv@gmail.com":2k85muyi]Sir any upadtes on this[/quote:2k85muyi]
this question has been already answered.