Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / October 2006

Tip: Looking for answers? Try searching our database.

hi friends do this

Thread view: 
sudhir.ku@gmail.com - 03 Oct 2006 12:55 GMT
"Make an Exception class (InvalidInputException) such that
1)Anyone can set the message explicitly.
2)With every message, there should be a text like ""[Name of class]""
This Exception will be thrown if user enters the age below 1 or above
155
Make another class to use this exception
Test this Class and observe the output. "
Deniz Dogan - 03 Oct 2006 13:27 GMT
> "Make an Exception class (InvalidInputException) such that
> 1)Anyone can set the message explicitly.
[quoted text clipped - 3 lines]
> Make another class to use this exception
> Test this Class and observe the output. "

No.
Chris Uppal - 03 Oct 2006 13:30 GMT
> "Make an Exception class (InvalidInputException) such that [...]

No.  /You/ do it; we'll watch...

   -- chris
Chris Brat - 03 Oct 2006 13:51 GMT
throw new com.lang.java.programmer.LazyException("Do your own homework
!!");
Michael Rauscher - 03 Oct 2006 15:10 GMT
Chris Brat schrieb:
> throw new com.lang.java.programmer.LazyException("Do your own homework
> !!");

Please provide a pointer to this library :)

Bye
Michael
Ed - 03 Oct 2006 14:16 GMT
sudhir.ku@gmail.com skrev:

> "Make an Exception class (InvalidInputException) such that
> 1)Anyone can set the message explicitly.
[quoted text clipped - 3 lines]
> Make another class to use this exception
> Test this Class and observe the output. "

Done.

.ed

--
www.EdmundKirwan.com - Home of The Fractal Class Composition.

Download Fractality, free Java code analyzer:
www.EdmundKirwan.com/servlet/fractal/frac-page130.html
z-man - 03 Oct 2006 15:12 GMT
> "Make an Exception class (InvalidInputException) such that
> 1)Anyone can set the message explicitly.
[quoted text clipped - 3 lines]
> Make another class to use this exception
> Test this Class and observe the output. "

public class LazyBoy
{
String thought = "Let me find a sucker that'll do my homeworks!";

public LazyBoy(){}
}

...
LazyBoy boy = new LazyBoy("sudhir.ku@gmail.com");
TechBookReport - 03 Oct 2006 15:19 GMT
>> "Make an Exception class (InvalidInputException) such that
>> 1)Anyone can set the message explicitly.
[quoted text clipped - 13 lines]
> ...
> LazyBoy boy = new LazyBoy("sudhir.ku@gmail.com");

Having looked at all the responses so far, I feel the need to refactor
your code slightly:

    try {
        LazyBoy sudhir=new LazyBoy("sudhir.ku@gmail.com");
    } catch(NoSuckerException nse){
        System.out.println("Failed miserably!!");
    }

Signature

TechBookReport Java http://www.techbookreport.com/JavaIndex.html

z-man - 03 Oct 2006 15:32 GMT
>>> "Make an Exception class (InvalidInputException) such that
>>> 1)Anyone can set the message explicitly.
[quoted text clipped - 22 lines]
>         System.out.println("Failed miserably!!");
>     }

Nice fix, indeed! ;-)
Christopher Benson-Manica - 03 Oct 2006 15:35 GMT
>  try {
>    LazyBoy sudhir=new LazyBoy("sudhir.ku@gmail.com");
>  } catch(NoSuckerException nse){
>    System.out.println("Failed miserably!!");
    Job job = new Job("Burger King or whatever they have in Bangalore");
    job.work( Time.FOREVER );
>  }

At least that's one fewer person to outsource American tech jobs to.

Signature

C. Benson Manica           | I *should* know what I'm talking about - if I
cbmanica(at)gmail.com      | don't, I need to know.  Flames welcome.

Tris Orendorff - 04 Oct 2006 15:32 GMT
>>  try {
>>    LazyBoy sudhir=new LazyBoy("sudhir.ku@gmail.com");
[quoted text clipped - 5 lines]
>
> At least that's one fewer person to outsource American tech jobs to.

Based on the quality of code coming out of India, I think it is safe to say Sudhir is over
qualified for the job.

Signature

Sincerely,

Tris Orendorff
[Q: What kind of modem did Jimi Hendrix use?
A: A purple Hayes.]

man4*.* - 03 Oct 2006 15:33 GMT
hello...
as a beginer in Java I've got a few workbooks for practice, so
here's one example.
-how to exchange content of 2 int variables x and y using only those 2
variables without using
any functions and any other variable?
temp=x;
x=y;
y=temp;
this would be easier...but they have to complicate.... :-)
man4*.* - 03 Oct 2006 15:33 GMT


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.