Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #14297
| From | "Hiram Hunt" <hiramhunt@verizon.net> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| References | <4fa58b39$0$41612$c3e8da3$3a1a2348@news.astraweb.com> <APednd33hPX6EzjSnZ2dnUVZ8gudnZ2d@giganews.com> |
| Subject | Re: JavaFX Slider compile time error |
| Date | 2012-05-05 17:53 -0400 |
| Message-ID | <4fa5a141$0$20320$c3e8da3$9deca2c3@news.astraweb.com> (permalink) |
| Organization | Unlimited download news at news.astraweb.com |
"Leif Roar Moldskred" <leifm@dimnakorr.com> wrote in message news:APednd33hPX6EzjSnZ2dnUVZ8gudnZ2d@giganews.com... > Hiram Hunt <hiramhunt@verizon.net> wrote: >> Hello, >> I have some code that gets compile time errors in >> some places but not others. I don't understand why >> one situation is apparently legal and the other is not. >> Here is the copy-and-paste of a minimal example: > > I don't have a Java development environment at hand, but > it looks like a problem with generics. > >> // Create a SliderBuilder with the setting of several >> // properties omitted for the sake of a minimal example. >> >> SliderBuilder sliderbuilder = SliderBuilder >> .create(); > > Try "SliderBuilder<?> sliderbuilder =" instead. > Thanks Leif and Markspace. Using <?> worked both in the minimal example and in the program I trimmed down to make the example. Using SliderBuilder<SliderBuilder> didn't, but thanks also. I understand some of how generic work, but not all. I assume that some type information that is available in the expressions that initialize okslider1 and okslider2 is lost by not including the <?> in "SliderBuilder<?> sliderbuilder". -- Hiram Hunt
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
JavaFX Slider compile time error "Hiram Hunt" <hiramhunt@verizon.net> - 2012-05-05 16:19 -0400
Re: JavaFX Slider compile time error Leif Roar Moldskred <leifm@dimnakorr.com> - 2012-05-05 15:32 -0500
Re: JavaFX Slider compile time error "Hiram Hunt" <hiramhunt@verizon.net> - 2012-05-05 17:53 -0400
Re: JavaFX Slider compile time error Lew <noone@lewscanon.com> - 2012-05-05 21:03 -0700
Re: JavaFX Slider compile time error Lew <noone@lewscanon.com> - 2012-05-05 21:09 -0700
Re: JavaFX Slider compile time error markspace <-@.> - 2012-05-05 14:16 -0700
csiph-web