padmini Babu

Ranch Hand
+ Follow
since Feb 10, 2001
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 padmini Babu

Congratulations Jeena!! This is indeed a great score
22 years ago
Thanks for the reply Marcus and Ian
I am looking out for a job sitting right here. Do you have any idea about some agents who can recruit me right from here. When i come to Australia, i need some work for survival (doesn't matter if the pay is low at the start)
In case u know of any vacancy also please let me know.
Please also advise me what other knowledge i can gain before i come to Australia so that finding a job would be easier.

22 years ago
Hi ketan,
This is in reply to your question on threads that you wanted.
There was a queston on deadlock. One on synchronization
one on threads which implement the runnable interface.
But most of them were jqplus questions.
There were two or three that were non jqplus questions also but I do not remember the context now.
Thanks for your wishes
Hi ranchers,
On 9th I cleared my SCJP exam with 74% . Although I was expecting at least 85 to 90% and would have been happier if i had got that.
I offer my thanks to javaranch and all javaranch members, the bartenders, moderators who helped me do it. Thanks to JQPlus too.
There were many who made prompt reply to many of my queries.
I received atleast around 10 questions on threads all of them one after the another not in random . Around 6 to 7 atleast on for while loops(tricky ones) with the ++ and -- operators.
All of them were codes only. Hardly did i receive maybe 4 to 5 overall on small objective questions not based on codes. I just received one question of I/O.
I think Javaranch is a great site. But i came to know it very late since the homepage talks about ranchers and things like that. So initally i came across the site but just ignored it thinking it might not be so useful.

Thank you very much everybody.

[This message has been edited by padmini Babu (edited July 10, 2001).]
22 years ago
Hi ranchers,
I am a Permanent Resident of Australia and have working visa too. I am planning to move to Australia by Jan next year. I have just completed my Sun Java Certification for programmer's level just now. I have experience in oracle for 1 and half years. A year and half in Java and also made up a website. I am not from the computer background.
I shifted to computers 4 years back. But I am a commerce graduate holder.
I would like to know what are the opportunities for me in Australia.
What kind or range of salary i can expect?
Is taking up a job in oracle better or java better?
I have heard that java has lost its demand. Is it true?
Please help by provding some info on the same.
Thanks in adv
22 years ago
Question ID :970968090080 - this is a jqplus quest
How can you declare a method someMethod() such that an instance of the class is not needed to access it
and all the members of the same package have access to it.
What is the diff in declaring a method and defining a method??
public class checkExcept
public static void main(String args[]) throws Exception {
Exception e = null;
throw e;.
G:\paddy\java\Jqplus590quest\jqplus\jj\Referencequest>java checkExcept
Exception in thread "main" java.lang.NullPointerException:
at checkExcept.main(
Problem: I presume if i put a throws in the main method, it acts as the defualt handler and if there is a checked exception it will handle it and hence no compile error. The same thing happens here to
Throw e is a checked exception which is handled.
Now why is NullPointerException thrown during runtime.
I understand that Exception e = null. But null can be assigned to any object. Also throw e, here e is a checked exception. So how come the nullpointerexception is thrown?
Pl help.
Thanks padmini

This is from a jqplus question:
class SomeThrowable extends Throwable { }
class MyThrowable extends SomeThrowable { }

public class TestClass
public static void main(String args[]) throws SomeThrowable
}catch(SomeThrowable e){
throw e;

public static void m1() throws MyThrowable
throw new MyThrowable();
Ans : This prints Done followed by an Exception.
My Question: Here a checked exception is thrown ultimately in catch which is caught by putting a throws in the main method.
So it is as good as the default handler handling this exception.
So , there is no compile error, agreed but then why during runtime the print statement "Done" is followed by a RunTimeError (when the same has been caught already by the throws in the main method).
Am I losing out something on the concepts?
Also when we say 'throw e' it means we are throwing an object of somethrowable. In that case , are we trying to throw a runtimeexception or checkedException.
Pleas e help me. I have my exam tomorrow.
Thanks padmini

Originally posted by JUNILU LACAR:
0111 1111 // 127
0111 1110 // 126
1111 1101 // 1 in sign bit, take as negative (two's complement)
Hi Junilu
Can u pl tell me how 127 and 126 was added up ( I mean whethere 1 and 0 is 1 or 1 and 1 is 1 , How?)
1111 1101 // this is a negative number. To find out its magnitude
0000 0010 // invert all bits to get 1's complement
0000 0001 // then add 1 to get 2's complement
Similarly, here How this 2's complement is arrived? whether 0 and 1 is one etc. ??
0000 0011 // 3 therefore, 1111 1101 is -3

[This message has been edited by padmini Babu (edited July 05, 2001).]

why should the answer be option 4???
Question 53) � NU
Given the following class definition which of the following can be legally placed after the comment line
//Here ?
class Base{
public Base(int i){}
public class MyOver extends Base{
public static void main(String arg[]){
MyOver m = new MyOver(10);
MyOver(int i){
MyOver(String s, int i){
1)MyOver m = new MyOver();
4)Base b = new Base(10); - C
Answer to Question 53)
4)Base b = new Base(10);
Any call to this or super must be the first line in a constructor. As the method already has a call to this, no more can be inserted.

Thanks in adv
Acc to me the ans to this question is 20,0,30 . any comments??
Question 51) � NU
Given the following code what will be the output?
class ValHold{
public int i = 10;
public class ObParm{
public static void main(String argv[]){
ObParm o = new ObParm();
public void amethod(){
int i = 99;
ValHold v = new ValHold();
}//End of amethod
public void another(ValHold v, int i){
v.i = 20;
ValHold vh = new ValHold();
v = vh;
System.out.println(v.i+ " "+i);
}//End of another
1) 10,0, 30
2) 20,0,30
3) 20,99,30
4) 10,0,20 �C
Answer to Question 51)
Answer 51)
Objective 5.4)
4) 10,0,20
In the call
A reference to v is passed and thus any changes will be intact after this call.
Thanks in advance
Any clue regarding this question , ranchers. pl help
Question 43) � NU
Your chief Software designer has shown you a sketch of the new Computer parts system she is about to create. At the top of the hierarchy is a Class called Computer and under this are two child classes. One is called LinuxPC and one is called WindowsPC.
The main difference between the two is that one runs the Linux operating System and the other runs the Windows System (of course another difference is that one needs constant re-booting and the other runs reliably). Under the WindowsPC are two Sub classes one called Server and one Called Workstation. How might you appraise your designers work?
1) Give the goahead for further design using the current scheme
2) Ask for a re-design of the hierarchy with changing the Operating System to a field rather than Class type
3) Ask for the option of WindowsPC to be removed as it will soon be obsolete
4) Change the hierarchy to remove the need for the superfluous Computer Class.
Answer 43)
Objective 6.1)
2) Ask for a re-design of the hierarchy with changing the Operating System to a field rather than Class type
This question is about the requirement to understand the difference between the "is-a" and the "has-a" relationship. Where a class is inherited you have to ask if it represents the "is-a" relationship. As the difference between the root and the two children are the operating system you need to ask are Linux and Windows types of computers.The answer is no, they are both types of Operating Systems. So option two represents the best of the options. You might consider having operating system as an interface instead but that is another story.
Of course there are as many ways to design an object hierarchy as ways to pronounce Bjarne Strousjoup, but this is the sort of answer that Sun will proabably be looking for in the exam. Questions have been asked in discussion forums if this type of question really comes up in the exam. I think this is because some other mock exams do not contain any questions like this. I assure you that this type of question can come up in the exam. These types of question are testing your understanding of the difference between the is-a and has-a relationship in class design.
Thanks in adv
Hi ranchers,
This is a jqplus question. I don't know how to calculate
Integer.toHexString ??
Question ID :961883785420
What would be printed during execution of the following program?
public class TestClass
public static void main(String args[])
System.out.print(" "+(1<<33)+" "+(1<<32)+" "+ Integer.toHexString(1<<31) );
What does JLS say regarding this?? any idea or example? Pl help
Quote from JLS:
if n is negative, the result is equal to that of the
expression (n>>s)+(2<<~s) if the type of the left-hand operand is int, and to the result of the
expression (n>>s)+(2L<<~s) if the type of the left-hand operand is long.
The added term (2<<~s) or (2L<<~s) cancels out the propagated sign bit. (Note that, because of the
implicit masking of the right-hand operand of a shift operator, ~s as a shift distance is equivalent to
31-s when shifting an int value and to 63-s when shifting a long value.)

what does
a. f.canonicalPath() return and
b.f.absolutePath() return??
Is the ++ operator used both for Objects as well as primitve data types or only primitive data types
Are all unicode values valid as identifiers??
Thanks in advance

[This message has been edited by padmini Babu (edited July 08, 2001).]

Question ID :952739430050
What events can be received by a component when it gains focus which other wise are not recieved?
MouseMotionEvent -- -f
MouseEvent -- f
keyEvent - ccorr
All events are received when the component has focus. -- f
Any comments???