munna next

Ranch Hand
+ Follow
since Sep 28, 2004
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 munna next

Hello
I am new to Hibernate and started learing with examples.
When I run the ANT build script I am getting the following error
I greatly appreciate if you could help me on this.



My Source Directory structure is


my ANT Build Script is
At Line1 I have given # of columns size as 2 and at Line 2 I have given 7.
How this works ? Thanks

class testing {
public static void main(String args[]){

int[][] i = new int[1][2]; //Line1

i[0] = new int[]{1,2,3,4,5,6,7}; //Line 2

}


}
[ August 03, 2006: Message edited by: munna next ]
I understand the concept. Thanks
Inner class can automatically able to access all the outer memebrs including private members. What advantage it will get when an inner class extends Outer class ?

Case1:

class outer{
String name;

class inner{//it will be able to access "name" }
}

Case 2:

class outer{
String name;

class inner extends outer {//it will be able to access "name" because it's an inner class }
}

Can anybody explain the advantage in the second case ? Tahnks


Explonations is



The three instances of class A form an isolated ring where each instance references the next instance and the third references the first instance. Four iterations of the for loop are processed. Inside the body of the for statement, the invocation of the print method contains the argument expression a0 = a0.other(). On the first iteration, the reference variable a0 references the instance named A3. The value returned by the method named other is a reference to the instance named A1. The reference is assigned to the reference variable a0 and is also the value produced by the expression a0 = a0.other(). That reference value is passed as an argument to the print method, and the print method invokes the A.toString method. With each iteration of the loop, the reference moves to the next object in the loop and the name of the object is printed. After four iterations, the loop ends and the method m1 returns. The invocation of the System.gc method serves as a suggestion that the garbage collector should be allowed to run. The system could ignore the suggestion, so there is no guarantee that the eligible arguments will be garbage collected. If they are collected, there is no guarantee which will be collected first. The only guarantee is that the finalize method will be invoked on each particular instance before the resources that had been allocated to that instance are reclaimed.

I have not understand the point

I have not understand the below wording

"(). On the first iteration, the reference variable a0 references the instance named A3. The value returned by the method named other is a reference to the instance named A1"


I know it is very difficult to explain with out face-to-face. But If anybody try to explain I will be thankfull.

[ July 25, 2006: Message edited by: munna next ]
[ July 25, 2006: Message edited by: munna next ]
Can any body tell me what is the default constructor access modifier ?
is it package access ? Thanks
Can any body pl greedy quantifiers explain . I am not able to understand K&B explonation. Thanks
<code>
? is greedy, ?? is reluctant, for zero or once
* is greedy, *? is reluctant, for zero or more
+ is greedy, +? is reluctant, for one or more
</code>
Pl see the below code


I know Line1 will not compile becuase the method donot1() is not existing in Parent class. But it is in an Anonymous inner class. If I want to call donot1() method how do I type cast to Anonymous inner class ? Tahnks very much for reply.
[ July 12, 2006: Message edited by: munna next ]
class Parent{
private int i=100;
abstract class Child{
abstract int implementhis();
class implementclass extends Child{
public int implementhis(){
return i;
}
}
}
}
can anybody tell me how to use the class implementclass which implemnted implementhis method ?
can I use this in the class Parent ? If not where can i use ? How to call this ? thanks

[ July 11, 2006: Message edited by: Barry Gaunt ]
Thaks Keith for reply. What happens if inner class is public ? I can use only thru sub class of the inner class ? I can not use this abstract inner class in enclosing class (Upper) ? tahnks for reply.
In the belwo code I know I can not use new Inner() becuase it's an abstract inner class. But I am not able to visualize where and how I can use abstract inner class ?


( tags added)
[ July 11, 2006: Message edited by: Barry Gaunt ]
interface MyInterface1{
int temp=1;
}

interface MyInterface2{
int temp=1;

}

public abstract class Testing implements MyInterface1, MyInterface2{
public static void main(String args[]){
System.out.println(MyInterface1.temp+1);
}

}


In this code how can I change the value temp ? temp is a "public static final" by default right ? Means it's a constant and we can not chnage the value right ? But this program compiles and prints "2". Can any body pl explain ? thanks
Hello ,
Can anybody pl give me free mock exam links ? thanks very much