Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem using Scanner in NetBeans 5.5

 
Ranch Hand
Posts: 201
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
I'm using NetBeans 5.5 and I keep getting an error that "Cannot find Symbol" on this line of code :

code:
--------------------------------------------------------------------------------

Scanner c = new Scanner(System.in);

--------------------------------------------------------------------------------



In Eclipse the same code has no error, what is going on here. Do I have to update Netbeans or something?
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Scanner was introduced with Java 1.5 - perhaps Netbeans is referencing an earlier version of the JDK?
 
Ilja Preuss
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Please do not crosspost. See http://faq.javaranch.com/java/CarefullyChooseOneForum

Closing...
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic