Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • 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:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

How can I fix this code?  RSS feed

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Java Cowboy
Sheriff
Posts: 16084
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It would be a lot easier if you would add an explanation to your code, besides only the title "How can I fix this code?".

What is the code supposed to do? What is the problem - do you get a compiler error, or an error when you try to run it? Or does it run, but produce output that is different from what you expected? If that's the case, then what exactly did you expect, what does it do in reality and how does that differ from what you expected?

Just by looking at it I can already see an error in the very first line: you are trying to import a class named Sec from the package java.util, but that package does not contain a class named Sec. What was your intention with that line? You're not using the class Sec in the code, so it seems redundant.

There are more errors. For example, String Map<String, String> in line 9 and nre HashMap in line 12, and i+=2> in line 16. You'll need to fix those syntax errors first.
 
Marshal
Posts: 5927
411
BSD
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Lots of syntax errors. Probably not much benefits in fixing this if you don't know basic (very) Java syntax.

What's that all about? Maybe a homework to fix compiler errors (that would be hard, because isn't clear to which shape this needs to be fixed, could be many interpretations of final result)?
Writing such code at work (hopefully not)?

Where did you get that code from?
 
Marshal
Posts: 59725
187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

Afraid that doesn't help. There is no HTML5() method there. You are mistaken about the syntax for “inputs”, but there are no inputs there
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have multiple syntax errors that need to be corrected, like the missing HTML5() method. It would be recommended you fix those then come back to us if you still have any issues.
 
Sheriff
Posts: 5022
138
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Ethan Mooney wrote:You have multiple syntax errors that need to be corrected,


Please be sure you are contributing something new to the thread before you post.

... like the missing HTML5() method.


The code does not need a HTML5() method.  It has a constructor.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!