This week's book giveaway is in the HTML Pages with CSS and JavaScript forum.
We're giving away four copies of Testing JavaScript Applications and have Lucas da Costa on-line!
See this thread for details.
Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

rate my first program

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think I made it a lot more complicated than it has to be...
its just a calculator

if anyone has a post I can look that shows you how to make code neater I'll take a look at it

IntArray.java


Math.java



CalcFrame.java
 
Master Rancher
Posts: 3879
35
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My comments:  
Several names do not follow standard java naming conventions.  Variables and methods should start with lowercase letter.
The formatting of the source text is inconsistent.  Much of the indentations are not proper.
Too much use of static.  
 
Jeremy Hutto
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you for your input!
I'll try to figure out what static means and does, as I was programming it just kept telling me it should be static so I let it correct it.
 
Marshal
Posts: 69873
278
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

Jeremy Hutto wrote:. . . I'll try to figure out what static means . . . .

That is a misleading error message; even using the term non‑static is bad. It tempts people to make things static because they cannot otherwise be accessed, when the correct solution is to move the access out of a static context.

I am afraid the long lines so difficult to read, that I am going to have to bounce the post back to you and ask you to shorten all those long lines.
 
Eat that pie! EAT IT! Now read this tiny ad. READ IT!
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic