The Artima Developer Community
Sponsored Link

Java Answers Forum
Java Interface

2 replies on 1 page. Most recent reply: Oct 3, 2009 5:06 PM by Rodney Lee

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 2 replies on 1 page
Rodney Lee

Posts: 2
Nickname: happysmile
Registered: Oct, 2009

Java Interface Posted: Oct 2, 2009 11:31 PM
Reply to this message Reply
Advertisement
I really need help on this question. It tells me to write a class named Prefix that implements an interface called Decision. public interface Decision<T> {
public boolean isOK(T o);
}
So, when objects of this class are constructed, they are passed to a String. The isOk method should return true when its parameter has been passed as its prefix. if "re" is called from decision, then isOk("really") returns true, but isOk("rich") returns false. Thanks for your help.


Vincent O'Sullivan

Posts: 724
Nickname: vincent
Registered: Nov, 2002

Re: Java Interface Posted: Oct 3, 2009 1:01 AM
Reply to this message Reply
The answer to this question is too simple to help you with. If you cannot use Google, or open a book, and find out how to answer this question for yourself then you will never answer any Java question, ever.

Rodney Lee

Posts: 2
Nickname: happysmile
Registered: Oct, 2009

Re: Java Interface Posted: Oct 3, 2009 5:06 PM
Reply to this message Reply
wow....that was really nice.

Flat View: This topic has 2 replies on 1 page
Topic: class not found exception Previous Topic   Next Topic Topic: need help with illegal start of type error

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use