Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Compile issue -- misplaced construct error  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi im using ready to program and after writing this code into the program i get a misplaced construct error.

please help i dont know what i did wrong.




the exact error : misplaced construct(s)

it highlights this line
import java.awt.*; 2nd line

at the very start and gives me the misplaced construct error

Yes this is all the code i have written down.

[Edit - added code tags - see UseCodeTags]
 
Bartender
Posts: 4568
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Vraj. Welcome to The Ranch!

The compiler should tell you what line the error is occurring on. That should give you a good clue as to what's gone wrong, but if it's not enough can you tell us what line it is?
 
author
Sheriff
Posts: 23503
138
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[EDIT -- changed the subject title to something more informative than "Helppp !!".]
 
Ranch Hand
Posts: 256
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you have all the code that you've posted here, in one file?
 
Forget this weirdo. You guys wanna see something really neat? I just have to take off my shoe .... (hint: it's a tiny ad)
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!