ashni Prakash

Ranch Hand
+ Follow
since Dec 05, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by ashni Prakash

Hi ranchers,

Can some tell me about design tool used for portal development.
I mean in java/j2ee we use UML-rational rose for design purpose like that what is used for portal development.I am still a learner of portals(BEA weblogic).It would be helpful if someone can tell me about this.
17 years ago
Hello friends,

Can anyone provide me interview questions for BEA weblogic portals.I have googled for same but did not find one.It would be great if someone can help me in this regard.

Thanks
Ashni
17 years ago
Ok sure.
The above question was from Whizlabs.
Thanks marc,satya and Deepak.
Deepak that was neat explianation..helped me a lot.

class Fizz{
int x=5;
public static void main(String[] args){
final Fizz f1=new Fizz();
Fizz f2=new Fizz();
Fizz f3=FizzSwitch(f1,f2);
System.out.println((f1==f3)+" "+(f1.x==f3.x));
}
static Fizz FizzSwitch(Fizz x,Fizz y){
final Fizz z=x;
z.x=6;
return z;
}
}



Tha answer for above code is TRUE TRUE

Can someone please help me in understanding the above code.I am finding it pretty confusing.
Can someone tell me the difference between Comparable and Comparator interface and which to use when with examples.

Thanks
I read java tutorials from sun first.
Now i am referring K&B book.Finding it very useful and learnt lots of things.It helps in analysing code very well.
Thanks Keith,Vishwa and Prashanth.That was a neat Explaination
Congrats praveen..
SO is the real exam easier than mock exam..I am scoring somewhere in between 80-85 in mock exams.
17 years ago

import java.util.*;
public class Collect{
public static void main(String[] args){
Vector<String> aList = new Vector<String>();
aList.add("USA");
aList.add("Russia");
aList.add("UK");
aList.add(null);
List<? extends Object> l = aList;



for(String s : l)

System.out.println(s);
}
}


The above question is from a mock and there is a compiler error in foreach construct.It asking for casting..can someone help me out how to do casting for this program as i am still learning generics.
Immutable means the created stirng object can never be changed.Just look at below example,

String s = "abc";
String s = s2;
s2 = concat.("def");

In above case s is referencing still "abc"
Only s2 now referenced to "abcdef"

check the below code,

String s = "hello";
s.concat("world");
System.out.println(s);

Output is "hello"
The object created on second line is "hello world".It doesnt have any reference so its lost though its existing.
Hi all,

Thanks for all your reply...
Only ferrari is eligible for Gc...means 1 object...
We should not consider reference varaible a2=a4=a5=null into count.Because if count them then its 4 objects available for GC.

Please someone tell me whether whatever i have understood is correct.

class Car {}
class Ferrari extends Car {}
class Camry extends Car {}

public class GC
{
public static void main(String[] args)
{
Car a1 = new Ferrari();
Car a2 = new Camry();
Car a3 = a1;
a1 = null;
Car a4 = a1;
Car a5 = a2;
a1 = a2;
a2 = a4;
a5 = null;
a3 = a1;

// Here
}
}


My doubt is while GC wether we must count reference varaibles equal to null or count objects without any references .Please someone help me in understanding this.
Hi raghavan,

Thanks a lot for the link and your blog.
Read both of them very informative and helpful.
Hello friends,

Can someone explain me how code works for pass by reference and pass by primitive value in java with example.

Thanks