Hello there. This is pretty frustrating for me.
I've been using Pluralsight for my introduction into
Java as a person who has no coding experience whatsoever. I'm now in the "Applying Access Modifiers" lesson of the "Java Fundamentals: The Java Language" class offered by Jim Wilson. It has taught me how to use access modifiers quite well, however there is no detailing into how to use it with the IntelliJ program, as no matter what class, method and object I try to construct, either an error appears or the class itself is not identified (it keeps saying "class 'GuitarShop' is never used") in the IntelliJ IDEA Community program.
I use Java 1.8.
Following the "Applying Access Modifiers" lesson, I went ahead to create the project GuitarShop, It's a tool that counts the inventory of guitars and drums using classes, methods and access modifiers.
When I create a new project in IntelliJ, I use the "Groovy" framework, create my object from the Command Line App template, and make sure the the Project Name, Project Location and Base Package hold the same name as my public class. After creating a new project, for some reason that I'm surely ignorant of, the file is under the name of Main.java, which of course needs to be changed to match the public class name. When I rename Main.java (by right clicking the Main.java tab and clicking "Rename File", the rest of the (files?package names?) are seen as erroneous, with their tabs underlined in red. My public class GuitarShop, which I want to use for this file and others, displays "Class 'GuitarShop' is never used". This I think pretty much screws up the rest of my code, and renders this
inoperable.
My field set the total amount of guitars to 100, and drums to 50. My method
discounts the amount of guitars and drums sold (int gSold = guitars sold, dSold = drums sold) and prints out the remainder of them left.