You are not logged in. Please login at www.codechef.com to post your questions!

×

Compilation error: File name

While compiling on Codechef IDE i got this error Main.java:2: error: class Shkstr is public, should be declared in a file named Shkstr.java public class Shkstr { Even I uploaded the file with same classname still I am getting this error

asked 06 Jun '18, 03:07

anshu005's gravatar image

1★anshu005
1
accept rate: 0%


just change "public class shkstr" to "public class Main"

OR

if you want to name your class to be shkstr, delete the keyword 'public' it will be "class shkstr"

link

answered 06 Jun '18, 07:55

kunnu120's gravatar image

2★kunnu120
5189
accept rate: 5%

toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×29
×15

question asked: 06 Jun '18, 03:07

question was seen: 121 times

last updated: 06 Jun '18, 09:27