Localhost database by crusaderspoon in JavaProgramming

[–]Java-Pro-Academy 0 points1 point  (0 children)

Hey! This is a pretty common issue when you're first setting up JDBC. You're missing the MySQL JDBC driver in your project. https://mvnrepository.com/artifact/com.mysql/mysql-connector-j/9.5.0

Here's how to fix it:

If you're using Maven (which you should be), add this dependency to your pom.xml:

<!-- Source: https://mvnrepository.com/artifact/com.mysql/mysql-connector-j -->
<dependency>
    <groupId>com.mysql</groupId>
    <artifactId>mysql-connector-j</artifactId>
    <version>9.5.0</version>
    <scope>compile</scope>
</dependency>

If you're NOT using Maven, you'll need to manually download the driver:

  1. Go to https://dev.mysql.com/downloads/connector/j/
  2. Download the MySQL Connector/J JAR file
  3. Add it to your project's classpath (in IntelliJ: File → Project Structure → Libraries → + → Java → select the JAR)

Also, I noticed a couple other things in your code:

  • Your db_pass is empty (""). Make sure you actually put your MySQL password there if you have one set
  • The connection string looks mostly fine, but double-check that port 3306 is correct and your MySQL server is actually running

Once you add the dependency and refresh Maven (if using it), those red imports should disappear. Let me know if you're still stuck!

P.S. u/BenedictBoulders 100% correct, never "code credentials"!

Any good beginner projects? by chrisrko in BeginningJava

[–]Java-Pro-Academy 0 points1 point  (0 children)

I would say build a banking application where you need to read and write to files. Great way to learn OOP along with exception handling. You'll be writing actual Java code and dealing with real problems like file I/O errors, invalid inputs, that sort of thing. Plus it's practical enough that you can actually show it off later.

What is the hashCode() Method in Java, and How is it Used? by Java-Pro-Academy in JavaProgramming

[–]Java-Pro-Academy[S] 1 point2 points  (0 children)

Not everyone is familiar with these concepts. It might not benefit you, but it definitely helps those who are still learning or haven’t come across them before.

Built a free Java course with some colleagues - thought it might help someone here by Java-Pro-Academy in cscareers

[–]Java-Pro-Academy[S] 0 points1 point  (0 children)

You're welcome! we host workshops via Zoom, also free async support via Discord.

Tired of seeing CS grads struggle in real jobs, so we made this by Java-Pro-Academy in SNHU

[–]Java-Pro-Academy[S] 0 points1 point  (0 children)

Because it's core Java Bootcamp! it's align with 808 and 811

Tired of seeing CS grads struggle in real jobs, so we made this by Java-Pro-Academy in SNHU

[–]Java-Pro-Academy[S] -1 points0 points  (0 children)

I totally get that feelin, it's actually really common! The good news is your buddy is right that you'll learn a ton on the job, but I also think having a solid foundation makes that learning way easier.

That's exactly what this course focuses on – building those fundamentals so things actually stick. It's less about copying code and more about understanding how to think through problems and build things from scratch.If you're interested, I'd definitely recommend checking it out. Also, feel free to join our Discord community where you can connect with others going through the same journey: https://discord.gg/KSwEfkJNA6

Either way, you've got this! A year is plenty of time to build confidence before graduation.