• 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:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

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: 23589
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?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!