Preethi Shetty

Greenhorn
+ Follow
since Feb 20, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Preethi Shetty

Hi,

Can someone explain the object finalization? I am not able to follow it.

Thanks,
Preethi
Hi,

Want to take up the Java Cetification. Can you please suggest the best way to study.

I have started of by studing "Core Java 2" by Hortsman & Cornell.Also am going through Java in a nut shell.Was wondering if the latest addition of these books cover the material for Java Certification. I need to know this for sure.

What are the other books/materials that will help me in preparing for the exam??? Any other suggestions regarding the manner of preparation is also weelcome.

Thanks,
Preethi
Hi,

Thanks for the reply. Yes Swamy has totally understood my question. So looks like there is no way we can do what I wanted to acomplish. If anybody else can throw light on my question I would be more than happy.

Preethi
Hi,

I understand that there are two ways in which we can format the o/p.
1)Using the NumberFormat Class AND
2)Using the Decimal Format class.Using the Decimal format class we can create our own output formats.So i wrote down a very simple program to test this.But I came across a problem.

Here is my code
PS: corejava has the Console class.So please don't bother about it.My doubt lies with the DecimalFormat part of the code.

import corejava.*;
import java.text.*;

public class MySalary1
{
public static void main(String[] args)
{
String name,formatout;
int salary;
DecimalFormat df;
df= new DecimalFormat("Rs, 00,00,000.00");
name = Console.readLine("Enter your name");
salary = Console.readInt("Enter your salary");
formatout = df.format(salary);
System.out.println(name + " your salary is " + formatout);
}
}

Please see the format that I have decided to use. It is (Rs,00,00,000).This doesn't work.It always displays the o/p in (Rs 000,000,000,000.00) fashion.How do I display the output in the manner that I want?

Thanks in advance for the help.

Preethi Shetty
Hi,
The question still remains unanswered............help needed..
Thanks,
Preethi
Hi,
You really made me put on my thinking caps............
After going through the following sets of examlpes I really don't know as to why the precedence rule with the && and || operator is not followed
Eg 1) boolean a,b,c;
a=b=c=false;
boolean x = (a=true) || (b=true) && (c=true);
After this statement values of the different boolean variables are,
a - true
b - false
c - false
x - true
Eg 2 -- boolean a,b,c;
a=b=c=false;
boolean x = (b=true) && (c=true) || (a=true);
After this statement values of the different boolean variables are,
a - false
b - true
c - true
x - true
&& HAS MORE PRECEDENCE THAN THE || OPERATOR THEN WHY IS IT THAT THE PRECEDENCE RULE IS NOT FOLLOWED IN THIS CASE?
Perhaphs the compiler has been built that way.I guess someone can help us in answering this question ...Experts do fill us in.
Thanks in advance for the help.
Preethi
Hi,
When the boolean || operator is encountered the control doesn't deal with the rest of the statement if its TRUE. In this case as the first part of the statement is TRUE so the control will not go beyond the || operator.Hence you see those results.
Now please try this:
boolean x = (b=true) && (c=true) || (a=true);
and you will get a result as,
a - false
b - true
c - true
x - true
Hope that helps,
Preethi
Hi Mohana,
I would love to have a copy of the same.Do email it to [email protected]
Thanks,
Preethi
Hi,
I am a C Programmer.I am planning to take up the Java Programmers Certification.To start with i have read a couple of chapter from the following books.
1)Head First Java by Cathy
2)Core Java 2 Vol 1 by Cay
I just want to know as to how i should go about with the studying?Does one have to master both the Vol 1 & 2 of the book "Core Java 2" to take up the exam.Which is the best book to learn & master Java ?
I am kind of lost on deciding on which book is best.So do advice me on how to go about in the process of getting the java Certification.
Thanks in advance for all the help.
I have the Windows 98 OS.Have downloaded java 1.4 from the sun web site.I see that that J2EE(TM) SDK 1.4 Developer Release is an executable file which is 116MB.Now after dowloading the same when I try to open the executable I get the following error.
J2EESDK-1_4-DR-WINDOWS-EVAL caused an invalid page fault in
module MSVCRT.DLL at 017f:780012b1.
Registers:
EAX=00000006 CS=017f EIP=780012b1 EFLGS=00010206
EBX=00000000 SS=0187 ESP=00550000 EBP=0055000c
ECX=004159b4 DS=0187 ESI=8177c848 FS=5797
EDX=7efeff52 ES=0187 EDI=8176de5c GS=0000
Bytes at CS:EIP:
ff 35 50 a1 03 78 ff 74 24 08 e8 03 00 00 00 59
Stack dump:
004029b5 00000006 004159b4 0055001c 004029fe 00000006 00000000 00550048 00404cf8 004159b4 8177c848 00000000 00000000 00000000 00000000 00000000

Why does this happen?Where are all the directories which contain the s/w?How do I go about installing Java so that I can start coding.
Thanks in advance for the help.
Preethi
20 years ago
I am C programmer with 4 years of experience in the telecommunication area.
I have been out of the job from 1 year.Plan to enhance my skills.I want to take up the Java cerrtification exam.Can you please let me know as to how I can start about.What are the pre requisits needed?What book are to be refered?I want to take up the Sun Certification exam.So please do help me out.
Thanks.
20 years ago