• Post Reply Bookmark Topic Watch Topic
  • New Topic

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: 16077
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.
 
Sheriff
Posts: 5055
357
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: 56819
173
  • 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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!