abhinav sood

Greenhorn
+ Follow
since Aug 05, 2011
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by abhinav sood

how to interrelate combo boxes with each other in javascript???

[EDIT: changed title to something meaningful]



why this program gives only two buttons in frame f

[Edit - added code tags - see UseCodeTags for details]
7 years ago
class Temp
{
public static void main(String... s)
{
int a[]=new int[10];
a[2]=1000;
System.out.println(a[2]);
}
}

here in the static block we are dynamically initialising the array so i wanted to know that how can we dynamically intialise the array in the static block and same is applicable for when we create the reference id inside the static block
7 years ago



this program is giving error in line no 11 not a statement
7 years ago

now its giving thee output temp2 ,temp1,temp2
nw i want to know temp1 class is public so how we can access it in some other package
7 years ago
I wanted to know how the reference variable works if a method contain nested methods.......
7 years ago
class Temp2
{
int x;
int y;
Temp2(int x,int y)
{
this.x=x;
this.y=y;
}
void show()
{
System.out.println(x);
System.out.println(y);
}
Temp2( Temp2 z)
{
this.x=x;
this.y=y;
}
public static void main(String... s)
{
Temp2 t1=new Temp2(10,20);
t1.show();
Temp2 t2=new Temp2(t1);
t2.show();
}
}
output: 10,20,0,0
7 years ago
class emp
{
static String cname="Abhinav";
public static void main(String... s)
{
static void display()
{
System.out.println(cname)
}
}
}
7 years ago
this program gives the output null and zero can any one explain that.....



[moderator edit: added code tags]
7 years ago