pravin kumar

Ranch Hand
+ Follow
since Nov 03, 2005
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by pravin kumar

There is method of allocate new employee to perticular task.
To allocate a new employee..have to click on the allocate label..which in terms
pop-up the new window with list of employees
now,based on the seleted employee with selection of the radio button
on the new pop- up window,respective name have to populate in the text field of the parent window.
please kindly help me on this..any pointer is appreciated
Anyone know about the exam centres in united kingdom
Strictly speaking as long as there is no reference could say that object is eligible to gc but still island of isolated objects are the exceptions for it
so i think answer should be false because of above reason
Please correct if am wrong
well probably it may sounds stubborn but i just want to know how come value of the i=1 here in the example

Integer wiNumber = new Integer(argv[0]);
int i = wiNumber.intValue();/// here
Integer wiNumber = new Integer(argv[0]);

what is value of wiNumber here?
public class Lukeg{
public static void main(String argv[]){
Lukeg lg = new Lukeg();
public void go(String[] argv){
Integer wiNumber = new Integer(argv[0]);
int i = wiNumber.intValue();/// here
i = i * 2;


[b]In above code how come value of i (in bold i) becomes 1 which in results in 2 as final output
What will happen when you attempt to compile and run the following code?

import java.util.*;
public class SortList{
public static void main(String argv[]){
new SortList();
ArrayList<String> al = new ArrayList<String>();
for(String element : al){

Answer is dcz ..please explain
public static void main(String[] args)
String s ="Hello";
String t = s.toLowerCase().intern();
String u = s.toLowerCase().intern();
if( t == u)
here as i know when u use '=='--it will return true if the both string references refer to same object
as in above code t and 'u' are two different object references
so after using 'intern()' method..does it make 't' and 'u' to refer to the same object as "t==u" returns true
Please guide on it
According to is more or less similar to the real time sun test
so i guess it's a nice score
BTW..from where did u download the exam..please send the site name for other racher's too
thnaks ..
best of luck
public class ExceptionTest{
public static void main (String[]args)
try {
catch (Exception e) //compilation error here
system.out.println("Caught Exception");

public static void methodA ()throws IOException{
throw new IOException ();

here we throw IOException in the methodA..
so according to my understanding u throw IOException in the method i.e. u declared the exception throwed in the method ..the same should not catched in try-catch block.
[b] please explain the same
hey i heard either you could declare or catch the exception
so it should not compile as
method() method throw exception and also catch the same in try-catch block
please explain
public class Test {
public static String output ="";

public static String foo(int i) {
if(i==1) {
throw new Exception();
output += "1";
catch(Exception e) {
output += "2";
return output;

finally {
output += "3";
output += "4";
//return output;
public static void main(String args[]) {
System.out.println("The output after foo(1) is:"+output);

here code goes go catch block..i just wanted to know tht can't we put
return statement in catch block rather than after finally

Please sorry if it is inane question
i's regarding all possible input parameters to the switch statement which are int,short,byte,char
public class BettyAck {
public static void main(String argv[]){
BettyAck b =new BettyAck();
public BettyAck() {
Integer x = new Integer(10);
Integer y = new Integer(99);
Integer z = y;
z = null;
public void findOut(Integer y){
y = null;


how many objects are garbage collected..ans=0..please explain
thnks for the both reply