• Post Reply 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
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Problem with java code in eclipse (calculator)

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm making a calculator in java (in eclipse) and I have a problem that I don't know how to solve. Below is a sample of the code and what is bolded is the problem, in eclipse it is underlined with red lines, why?

 
Marshal
Posts: 76866
366
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch

Please don't use coloured text because some people can't read it.
Please use the code button; I have added code tags to your post and doesn't it look better now Bold tags and other formatting do not work inside code tags.

Danilo Sekulic wrote:. . . why? . . .

Don't know.

If you hover the mouse on the red marks, Eclipse will show you the compiler error and give you a dropdown list of suggestions to correct it.
 
Trailboss
Posts: 23548
IntelliJ IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
why is this in "ranch office"
 
Campbell Ritchie
Marshal
Posts: 76866
366
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry, I didn't notice that and forgot to move it. We regularly see newbies posting here by mistake.

Moving to a more appropriate location.
 
Marshal
Posts: 4015
549
Android Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:If you hover the mouse on the red marks, Eclipse will show you the compiler error ...


You also can see a list of all project errors by selecting Window / Show View / Problems from the menu (or Alt+Shift+Q followed by X). and then right-click on a particular error to give options such as Quick Fixes like Campbell mentioned.
 
If you settle for what they are giving you, you deserve what you get. Fight for this tiny ad!
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic