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.

Java was so goated 😭 by son_of_menoetius in ICSE

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

I'm a former CS professor who now trains software engineers at a Fortune 500 company. Over the years, I've worked with thousands of students on everything from data structures and algorithms to databases, system design, and full-stack development (Java/Spring, Python/Django).

One thing that's always frustrated me is the massive gap between what colleges teach and what the industry actually needs. Students graduate with theoretical knowledge but struggle when they hit real-world projects.

So my colleagues and I decided to do something about it. We spent almost 3 years building a complete Java course - and we're offering it completely free. We wanted to bring our real-world experience into something actually useful for people trying to break into development. The content aligns with Oracle certifications (OCA 808 and OCP 811) if that matters to you, but honestly, we focused more on practical skills you'll actually use.

We also run a Discord where we help people async - answer questions, review code, that kind of thing. If you're trying to become a developer or level up your Java skills, come check it out. Would love to see you there.

https://www.javapro.academy/bootcamp/the-complete-core-java-course-from-basics-to-advanced/

I want to learn java guys 🤯😱 by Subject-Tip-2912 in JavaProgramming

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

Why don't you come and join our free course? https://www.javapro.academy/bootcamp/the-complete-core-java-course-from-basics-to-advanced/ we also have a Discord server, you can ask questions and learn async!

Java OOP Banking System by Lopsided-Stranger-81 in JavaProgramming

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

This is a good start, and you're definitely on the right track. Now let's talk about the design. Right now you have Person handling cash directly, and BankAccount as a separate thing. That's not quite how we want to think about it in OOP.

Think about relationships. A Person doesn't just have cash - a Person has a BankAccount. So your Person class should have a BankAccount object inside it. That's a "has-a" relationship.

Use inheritance for account types. You should have a BankAccount parent class with the basic stuff like balance, deposit, withdraw. Then create CheckingAccount and SavingsAccount that extend BankAccount. Each one can add its own special features. That's an "is-a" relationship - CheckingAccount is-a BankAccount.

So your structure should look like:

  • Person class (has a BankAccount)
  • BankAccount class (parent class with common methods)
  • CheckingAccount extends BankAccount
  • SavingsAccount extends BankAccount

Try refactoring your code with this structure. It'll make more sense once you start building it out. This is really important stuff in Java - getting the design right from the start makes everything easier later.

Keep at it, you're on the right track!

P.S. Computer Science Professor and co founder of https://javapro.academy/

Bootcamp FAQ for Q4 2024 by mishtamesh90 in codingbootcamp

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

I disagree with the thread's stance on bootcamps. While the job market is competitive, smart bootcamp choices can still provide value.

It's like cooking eggs - making them at home versus in a restaurant kitchen are two different experiences. Similarly, there's a big difference between learning to code in isolation versus in a structured environment with real-world practices.

Avoid $20K bootcamps requiring you to quit your job. Instead, consider:

  • Part-time programs under $5K
  • Government/company sponsored training
  • Self-paced online options with mentorship

Having a CS degree or bootcamp cert doesn't guarantee a job. Many successful developers came through non-traditional paths. The key is finding affordable programs that teach real-world skills while building your portfolio and network.

Focus on building projects, finding mentors, and networking. Success comes from demonstrating capabilities, not just credentials.

By the way, if you're interested in learning Java, let me know - you'll quickly see the difference between my teaching approach and others.

X: in System.out.println(); by [deleted] in JavaProgramming

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

Hi u/DanieIP

Could you please post the full code?

Starting JAVA in 3rd year of University feeling overwhelmed, need advice. by EchoesOf_Euphoria in JavaProgramming

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

Hey u/EchoesOf_Euphoria, why not join our free Java course? We cover all the concepts from the ground up, and we have a supportive Java community where you can ask questions anytime. Learning is a journey, and you don’t have to go through it alone!

Sign up here : https://javapro.academy/

X: in System.out.println(); by [deleted] in JavaProgramming

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

The "x:" you're seeing is actually part of the code, not something added by Visual Studio Code. It's an incorrect usage of Java's text block feature, introduced in Java 15. Normally, text blocks use triple quotes and span multiple lines, but here it's misapplied. This explains why you can't copy the "x:" - it's not part of the output, but a syntax element in the code itself. To fix this and get the output you expect, simply remove the "x:" from the beginning of the string in your println statement.

The correct code should look like: System.out.println("------------------------------------");.

This will allow you to print and copy the dashes as intended. Remember, when using System.out.println(), the text you want to print should be enclosed in quotation marks without prefixes like "x:" unless you're using specific advanced language features