Megha kharde

Greenhorn
+ Follow
since Nov 24, 2010
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
4
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Megha kharde

Assuming i have taken laptop with me, i would only need a os installed in it with a browser (as i would be able to access the Internet and download other softwares)
9 years ago
Congratulations Steve

I also want to register for the exam but have confusion about the registration process.

how long have you registered for the exam before appearing for the real exam?Should i make the preparation and then register or i can register first and then start preparing.
9 years ago
Why are you using two different Scanner objects?

Scanner DiceOrCoinScanner = new Scanner(System.in);
Scanner NumberOfDiceScanner = new Scanner(System.in);

however you could have used a single Scanner object. Am i right? If anybody knows please correct me.


9 years ago
Thank you Campbell for providing such a detailed explaination.
Realy helpfull for beginers like me.

9 years ago
try this

for(;;){
System.out.println(" ");
if(true) continue;
else if(true)break;
else return 0 ;
}
9 years ago
When to use ObjectOutputStream?
does anybody know?
9 years ago
Bear Bibeault,
It would be a cheating to my soul.
I should stick to the answer whcih is on my own experience, and not of someone else's experience.

Thank you for giving me a reminder.
9 years ago

Campbell Ritchie wrote:Have you never helped anybody with a problem?


i have helped, but the interviewer was never satisfied with my answer
9 years ago
i would like to add one point
by making instance variables private we can protect them from assigning them to unwanted values . In public accessor method (in setters) we can
add the code to check for allowed values.
For example, for a student we do not want to set its roll no to a negative value

9 years ago

Eric Pascarello wrote:

Megha kharde wrote:I think you can use <META HTTP-EQUIV="Refresh" CONTENT="0>
which instructs a web browser to automatically refresh the current web page or frame after a given time interval, using an HTML meta element with the http-equiv parameter set to "refresh" and a content parameter giving the time interval in seconds.



Also creating an infinite loop of refreshing.

Eric



I am a beginer in Java. I came across this use of meta refresh while studing a struts2 example from Struts2 In Action to redirect the request from an index.html page
<META HTTP-EQUIV="Refresh" CONTENT="0;URL=Menu.action">
I think you can use <META HTTP-EQUIV="Refresh" CONTENT="0>
which instructs a web browser to automatically refresh the current web page or frame after a given time interval, using an HTML meta element with the http-equiv parameter set to "refresh" and a content parameter giving the time interval in seconds.
FileOutputStream f=new FileOutputStream("out.ser");
f.write();

Here, this write() method argument is of type int, so Unicode character value of '\n' i.e 10 is written to the file .
but if i use ObjectOutputStream and use its writeChar(char) method instead of FileOutOutStream newline character is writene to the file .


In my existing serializable Car class i tried to use ObjectOutputStream and its writechar(char) method

9 years ago