anamika henry

Ranch Hand
+ Follow
since Mar 09, 2007
Merit badge: grant badges
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 anamika henry

I am taking the exam in 10 days.can someone please tell me which mock exam should i practice, form the list of exam on this site.. i have wizlabs but i really find it difficult to solve .. which are a good one..right now i am going through 1) danchisholm and Marcus Green's but marcus green we need to buy it to acess all the quesions..i really nedd to pass the exam.

i have no java background,i studied on my own K&B..my problem is i forget the concepts soon..i have almost read the book 3 times ..and have written few codes too..please help
import java.util.regex.*;

public class FindAt{
private static Pattern pattern;
private static Matcher matcher;
public static void main(String argv[]){
new FindAt();
}
FindAt(){

pattern = Pattern.compile("@");
matcher = pattern.matcher("@someisp.com");
if(matcher.find()){
System.out.println("found @");
}
pattern = Pattern.compile(".@.");
matcher = pattern.matcher("@someisp.com");
if(matcher.find()){
System.out.println("email found");
}


}
}

can some one please help me with this code, explain me each step
from FindAt()
thank you moon, i could understand now
can you explain me the line

Mixer m5 = m2.m1; m5.go();

what is m2.m1 and m5.go(); means
class Mixer{
Mixer(){}
Mixer(Mixer m){m1=m;}
Mixer m1;
public static void main(String[] args){
Mixer m2= new Mixer();
Mixer m3 = new Mixer(m2); m3.go();
Mixer m4= m3.m1; m4.go();
Mixer m5 = m2.m1; m5.go();

}
void go() {System.out.print("hi");}
}
hey shilpa congrats i m taking the exam soon,i have read K&B twice but when i start appearing for mocks i see that i find hard in recollecting there are so many topics..can you suggest me how you prepared.. i really need to pass this exam in 10 days i m doing wizlabs right now..

did you had any experice in java before.. on which topics should i stress more.. is the exam hard..
can please any one explain me this line: in the above code

for (String s : arr1)
can please any one explain me this line: in the above code

for (String s : arr1)
hello friends ..I am apperaring for java 1.5 ..i have 1.4 installed do i need to install 1.5 to run all the codes of generics,enum etc which are not in 1.4..do i need to uninstall 1.4 before installing 1.5.
15 years ago
can any one please explain me the line 6,7,9 and 11

1.class Fizz{
2.int x=5;
3. public static void main(String args[]){
4. final Fizz f1= new Fizz();
5.Fizz f2 =new Fizz();
6. Fizz f3 = new FizzSwitch(f1,f2);
7. System.out.println((f1==f3) + " " + (f1.x==f3.x));
8.}
9.static Fizz FizzSwitch(Fizz x,Fizz Y){
10. final Fizz z = x;
11.z.x=6;
12. return z;
13.}
14.}
Thank you everyone for your explainations..it was of great help
can anyone explain me from line 10-14.
can anyone explain me from line 10-14.
hii can anyone please expalin me this set of code right from the 1st line till last..what's happening..i'll appreciate your help.

1.class Animal{
2. void makeNoise(){System.out.println("generic noise");}
3.}
4.class Dog extends Animal{
5.void makeNoise(){System.out.println("bark");}
6.void playDead(){System.out.println(" roll over");}
7.}
8.class CastTest2{
9. public static void main(String [] args){
10.Animal [] a={new Animal(),new Dog(),new Animal() };
11.for(Animal animal : a){
12. animal.makeNoise();
13. if(animal instanceof Dog){
14. animal.playDead();
15. }
16. }
17. }
18.}


output;
cannot find symbol