This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Rust Web Development and have Bastian Gruber on-line!
See this thread for details.
Win a copy of Rust Web Development this week in the Other Languages forum!

Pragya Prakash

Ranch Hand
+ Follow
since Sep 18, 2000
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 Pragya Prakash

Thank you, carl for replying
I need to create a java server, which could listen to a perl client's requests...load the appropriate class and give the results back.
I know this can be done thro' socket programming, but I don't know how?
Please guide me in this....thanks a million.

Don't get discouraged by this rude recruiters words...
I don't know, how much they know about the market. Try to work with multiple recruiters and don't rely on just one of them.
Keep on applying and giving interviews. Be positive and articulate.
Also, get some knowledge about RDBMS databases and XML.
Best Of Luck!
20 years ago
I agree with False.
Maybe, we need some expert comments here
Regards,
Pragya

Originally posted by Ishaan Mohan:
Hi Everyone,
Can we conclude that "All the members except private members of a class are inherited by suclasses"
Hence if question is : All the members of a class are inherited by subclass ? False
what do you think ?


Congratulations, Cherry.
It's a pretty good score
Please tell me more about this.
Thanks,
Pragya

Originally posted by Cherry Mathew:
hi,
I put quotes for all the answers which was String and i got them wrong.
I found two questions wrong in the exam and im very sure about them. I answered the odd man out among them but i dont think i got it right.


I agree with you, huiying, it is definitely an unfair question...
We cannot remember the Unicode values.
Are these type of questions asked in the SCJP?
Regards,
Pragya

Originally posted by huiying li:

a. char c = '\u000a';
This is equivalent to
char c =
;
Therefore the compiler complains that "illegal line end in character literal"
same with d)
To get the correct answer, we have to remember the Unicode value for Linefeed and Carriage return. I would consider this an unfair question.

Q.2
In == operator if two primitive values of different types are used narrower type is promoted to the greater type or not?
Yes.


Gaurav,
I think you are very much right.
I was just saying that private methods/members cannot be used as they are.
I apologize for being a bit ambiguous in my above statement.
Regards,
Pragya
Private members of a class are private to that class, they cannot be accessed outside the class.
And in a subclass, private members cannot be accessed
That means, they are still unavailable.
IMHO, the answer is False.

Originally posted by Wasim Ahmed:
Yes, private member are inherited but they are hidden. it means you cannot access them.



[This message has been edited by Pragya Prakash (edited February 26, 2001).]
Manfred, please explain in more detail.....
What is this code? Is this internal code of GridLayout?
Thanks,
Pragya

Originally posted by Manfred Leonhardt:
[B]Hi all,
To understand GridLayout you need to look at the code:

Therefore the following:
GridLayout(4,4)
will not divide the screen up into 16 parts! It will divide the screen up into 4 rows. Therefore the following would perform the same:
GridLayout(4,0)
That is why good Java programmers will make sure that the unnecessary parameter is set to zero so that other programmers will know their intent.
Happy programming,
Manfred.[/B]



Originally posted by Cherry Mathew:

In the code given there are 10 alloted spaces and u r adding 8 components then it first fills 5 columns of first row and goes to next row and puts the three remaining components are put in the second row.
Cherry


Cherry, this is what I expected, i.e.
b1 b2 b3 b4 b5
b6 b7 b8 - -
But when I run it. What I get is
b1 b2 b3 b4
b5 b6 b7 b8.
So, after experimenting with more scenarios, I came to the conclusion, that it honors the no. of rows.
Experts, pls. comment on this.
Thanks,
Pragya
i think it honors the no. of rows.
Correct me if I m wrong
GridLayout never honors the components´┐Ż preferred size
This layout arranges the components in no of rows/columns specified in the constructor.
But, from my experiments, it seems as if it just honors the no. of rows specified and not the columns, and arranges the components so that they would be equally sized in the matrix.
Regards
Answer to question no.2
Private methods can be overloaded, but not overridden.
Methods cannot be overridden to have less accessibility.
For eg:- we can override a public method to be private, but not vice versa.
Regards
It is basicaly a classpath problem.
compile the class with the -classpath option.
Add the home directory of ur package to the classpath.
Be sure to include the current directory in the classpath.
Regards
20 years ago
A method can be declared final to prevent subclasses from overriding or hiding it. It is a compile-time error to attempt to override or hide a final method
A private method is said to be implicitly final.
And since the main method is public, I think we can declare it as final, so that it cannot be overrridden.
Just a small class for testing, whether main can be declared as final or not.
public class AClass {
private int SomeNum = 10;
public final static void main(String ars[])
{
AClass Aobj = new AClass();
System.out.println("int:" + Aobj.SomeNum);
}
}
Moderators, correct me if I am wrong.
Regards