Question: This is honestly a tiny problem but it's keeping me from proceeding with my small Java practice app.

I'm currently practicing making an API call in Java. I was trying to create a simple class file called "Film". However, when I try to create it as a class-file, Intelli-J keeps telling me that it is unable to create a class-file. I'm trying to set this file up in a folder called "models". All of these class files are going to be utilized as part of an app that performs API calls.

Is there some naming convention I haven't followed? I've been Googling but haven't really found anything.

Answer: 
More directly, based on what @Vishal Jumani touched on, you need to tell IntelliJ what directories are 'source' or 'test' directories.

A directory structure you can use as an example, but you can use whatever you wish.

[![enter image description here](https://i.stack.imgur.com/LavR7.png)](https://i.stack.imgur.com/LavR7.png)

Right click on the directory you wish to mark as 'root' --> find 'Mark Directory As' --> Select 'Sources Root'

[![enter image description here](https://i.stack.imgur.com/LbWvZ.png)](https://i.stack.imgur.com/LbWvZ.png)

Now you should be able to add java classes in the directory without IntelliJ interrupting you!
This would usually be because of the way your project is setup. It may not be setup correctly to indicate where your source code is.

* To setup your project, in the Project Tab, click on the top most folder and select F4. This should bring up the Project Settings dialog window.
* Now click on Modules in the LHS, and then select the Sources Tab on the RHS
* Select your src folder and click on the Sources button, to indicate this is your source folder. Now IntelliJ is aware that this is where your code is.
* Click on Apply and OK. This should close the Dialog Window.
* Now right click on the src folder and then select New -> Java Class to create your Java class