commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Pratt <thechrispr...@gmail.com>
Subject Re: Why is the constructor for Fraction class private.
Date Tue, 20 Dec 2011 22:50:40 GMT
Hmmm, the javadoc on the page you referenced shows the package as
org.apache.commons.math.Fraction, no lang3 in there.  And it also shows the
Constructors as public.
  (*Chris*)

On Tue, Dec 20, 2011 at 2:45 PM, Apurv Verma <dapurv5@gmail.com> wrote:

> Hii all,
>   I recently began exploring apache commons library. I downloaded the
> latest copy from [0]. Here is the code that I wanted to run.
>
>
> import org.apache.commons.lang3.math.Fraction;
>
> public class FractionDemo {
>
> public static void main(String[] args) {
>  Fraction f = new Fraction(1,3);
>
> }
>
> }
>
> I can't do this because the constructor in the Fraction class has been made
> private. I was following the tutorials given here [1]
>
>
>
> [0]
>
> http://www.ecoficial.com/am/commons/lang/binaries/commons-lang3-3.1-bin.tar.gz
> [1] http://commons.apache.org/math/userguide/fraction.html
>
>
> --
> thanks and regards,
>
> Apurv
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message