Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #9103

Re: Question regarding methods and classes

From markspace <-@.>
Newsgroups comp.lang.java.programmer
Subject Re: Question regarding methods and classes
Date 2011-10-22 22:14 -0700
Organization A noiseless patient Spider
Message-ID <j807ru$8h6$2@dont-email.me> (permalink)
References <4ea389df$0$13444$9a566e8b@news.aliant.net> <j807nt$8h6$1@dont-email.me>

Show all headers | View raw


Oh, and use method overloading, don't need to append "Int" and "Double" 
to your method names.

On 10/22/2011 10:12 PM, markspace wrote:

>> package helperClasses;
>> public class rType {
>
> private rType() {}
>
> public static boolean isBetween(int a, int b, int c)
>> {
>> return (a<= c&& a>=b);
>> }
> public static boolean isBetween(double target, double lower,
> double upper)
>> {
>> return (target<= upper&& target>= lower);
>> }
>> }
>
>
> import static helperClasses.rType.*;
>>
>> class rTypeTest {
>> public static void main(String[] args) {
>
> boolean hello = isBetween(4,6,87);
>> System.out.println(hello); // weird choice of variable names...
>> }
>> }
>

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Question regarding methods and classes Linus Flustillbe <admin@nacs.dyndns-office.com> - 2011-10-23 03:28 +0000
  Re: Question regarding methods and classes Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2011-10-22 20:44 -0700
    Re: Question regarding methods and classes Patricia Shanahan <pats@acm.org> - 2011-10-23 06:14 +0100
  Re: Question regarding methods and classes markspace <-@.> - 2011-10-22 22:12 -0700
    Re: Question regarding methods and classes markspace <-@.> - 2011-10-22 22:14 -0700
      Re: Question regarding methods and classes Linus Flustillbe <admin@nacs.dyndns-office.com> - 2011-10-23 13:32 +0000
        Re: Question regarding methods and classes markspace <-@.> - 2011-10-23 07:43 -0700
        Re: Question regarding methods and classes Lew <lewbloch@gmail.com> - 2011-10-23 08:54 -0700
  Re: Question regarding methods and classes Roedy Green <see_website@mindprod.com.invalid> - 2011-10-23 01:37 -0700
    Re: Question regarding methods and classes Linus Flustillbe <admin@nacs.dyndns-office.com> - 2011-10-23 13:49 +0000
      Re: Question regarding methods and classes Roedy Green <see_website@mindprod.com.invalid> - 2011-11-02 01:23 -0700
  Re: Question regarding methods and classes Linus Flustillbe <admin@nacs.dyndns-office.com> - 2011-10-23 09:11 +0000

csiph-web