# Java

**URL:** https://forum.codewithmosh.com/c/java/7.md

[Latest](https://forum.codewithmosh.com/latest.md) · [Categories](https://forum.codewithmosh.com/categories.md)

---

## [About the Java category](https://forum.codewithmosh.com/t/about-the-java-category/17)

<div class="topic-metadata">

**Author:** [@Mosh](https://forum.codewithmosh.com/u/Mosh)\
**Replies:** 0\
**Last updated:** [October 22, 2020, 10:26pm UTC](https://forum.codewithmosh.com/t/about-the-java-category/17 "2020-10-22T22:26:20Z")

</div>

---

## [Java beginner here, need help please](https://forum.codewithmosh.com/t/java-beginner-here-need-help-please/27129)

<div class="topic-metadata">

**Author:** [@silklv](https://forum.codewithmosh.com/u/silklv)\
**Replies:** 3\
**Last updated:** [August 25, 2026, 5:06pm UTC](https://forum.codewithmosh.com/t/java-beginner-here-need-help-please/27129 "2026-08-25T17:06:02Z")

</div>

I started Mosh beginner course and downloaded Java, jdk 12 and Intellij like he suggested. When I start a new project, it doesn’t let me create project from template and put it in a package. and when I try to run in te…

---

## [Part 3. First Java Code](https://forum.codewithmosh.com/t/part-3-first-java-code/71881)

<div class="topic-metadata">

**Author:** [@TCBaker](https://forum.codewithmosh.com/u/TCBaker)\
**Replies:** 2\
**Last updated:** [August 22, 2026, 10:54pm UTC](https://forum.codewithmosh.com/t/part-3-first-java-code/71881 "2026-08-22T22:54:26Z")

</div>

Hello! I was wondering if the lesson will be different for each person who will be on a different operating system? I was following the instructions listed to setup my first code within the intellij ide but noticed that…

---

## [Help me please Im was stuck with Spring data jpa repository](https://forum.codewithmosh.com/t/help-me-please-im-was-stuck-with-spring-data-jpa-repository/73048)

<div class="topic-metadata">

**Author:** [@monyoudom](https://forum.codewithmosh.com/u/monyoudom)\
**Replies:** 2\
**Last updated:** [July 21, 2026, 6:32am UTC](https://forum.codewithmosh.com/t/help-me-please-im-was-stuck-with-spring-data-jpa-repository/73048 "2026-07-21T06:32:10Z")

</div>

I Already install the jpa buddy but it only appears like this

---

## [Java exercises:](https://forum.codewithmosh.com/t/java-exercises/72350)

<div class="topic-metadata">

**Author:** [@fernandohlee](https://forum.codewithmosh.com/u/fernandohlee)\
**Replies:** 3\
**Last updated:** [May 18, 2026, 2:19pm UTC](https://forum.codewithmosh.com/t/java-exercises/72350 "2026-05-18T14:19:56Z")

</div>

I received some java exercises on email, and I wanted to give them a try. I’m posting my solution to excercise “1. Prime Numbers“ since it the mail said “Feel free to share your solutions“ in this forum. I would like to …

---

## [Java Spring boot](https://forum.codewithmosh.com/t/java-spring-boot/26664)

<div class="topic-metadata">

**Author:** [@mhndev](https://forum.codewithmosh.com/u/mhndev)\
**Replies:** 7\
**Last updated:** [March 8, 2026, 8:46pm UTC](https://forum.codewithmosh.com/t/java-spring-boot/26664 "2026-03-08T20:46:35Z")

</div>

Does anyone know if @Mosh is going to make a spring boot course or not ?

---

## [Java Spring Boot Course](https://forum.codewithmosh.com/t/java-spring-boot-course/11638)

<div class="topic-metadata">

**Author:** [@lgal](https://forum.codewithmosh.com/u/lgal)\
**Replies:** 4\
**Last updated:** [March 8, 2026, 8:38pm UTC](https://forum.codewithmosh.com/t/java-spring-boot-course/11638 "2026-03-08T20:38:13Z")

</div>

hello. @codewithmosh are you going to make a full Java Spring Boot Course?

---

## [Java/Spring Boot course Version Error](https://forum.codewithmosh.com/t/java-spring-boot-course-version-error/71254)

<div class="topic-metadata">

**Author:** [@elliottHudson](https://forum.codewithmosh.com/u/elliottHudson)\
**Replies:** 2\
**Last updated:** [March 8, 2026, 8:35pm UTC](https://forum.codewithmosh.com/t/java-spring-boot-course-version-error/71254 "2026-03-08T20:35:38Z")

</div>

Immediately after cloning the spring-api-starter repository into my IntelliJ Ultimate Edition i get a runtime error of: java: java.lang.ExceptionInInitializerError com.sun.tools.javac.code.TypeTag :: UNKNOWN….After goog…

---

## [Please help me learn core java better way](https://forum.codewithmosh.com/t/please-help-me-learn-core-java-better-way/72046)

<div class="topic-metadata">

**Author:** [@number1digital](https://forum.codewithmosh.com/u/number1digital)\
**Replies:** 5\
**Last updated:** [March 8, 2026, 8:32pm UTC](https://forum.codewithmosh.com/t/please-help-me-learn-core-java-better-way/72046 "2026-03-08T20:32:04Z")

</div>

I have paid subscription to “The Ultimate Java Mastery Series” and my question is How should I learn properly? My steps for learning Java will be: by watching video first and understand “why” and “how” of the concept f…

---

## [Spring Boot environment setup](https://forum.codewithmosh.com/t/spring-boot-environment-setup/72323)

<div class="topic-metadata">

**Author:** [@PeterPandit](https://forum.codewithmosh.com/u/PeterPandit)\
**Replies:** 1\
**Last updated:** [March 8, 2026, 8:24pm UTC](https://forum.codewithmosh.com/t/spring-boot-environment-setup/72323 "2026-03-08T20:24:26Z")

</div>

I am having issue to set up the environment of Spring boot in VS code. Can anyone help me to set that? Or suggest me any resources like videos or anything that would help me to set that.

---

## [Open Session In View (OSIV)](https://forum.codewithmosh.com/t/open-session-in-view-osiv/72305)

<div class="topic-metadata">

**Author:** [@mznrasil](https://forum.codewithmosh.com/u/mznrasil)\
**Replies:** 0\
**Last updated:** [February 23, 2026, 3:28pm UTC](https://forum.codewithmosh.com/t/open-session-in-view-osiv/72305 "2026-02-23T15:28:08Z")

</div>

In Spring Boot (Part 2) Lesson while adding a product item to a cart, Mosh uses the Cart Entity’s cartItems getter method to filter the list of products by the productId. However, there is @OneToMany relationship in the …

---

## [Sprint Boot (Part 1) - List v/s Set while defining relationships in entity](https://forum.codewithmosh.com/t/sprint-boot-part-1-list-v-s-set-while-defining-relationships-in-entity/72268)

<div class="topic-metadata">

**Author:** [@mznrasil](https://forum.codewithmosh.com/u/mznrasil)\
**Replies:** 0\
**Last updated:** [February 15, 2026, 12:29am UTC](https://forum.codewithmosh.com/t/sprint-boot-part-1-list-v-s-set-while-defining-relationships-in-entity/72268 "2026-02-15T00:29:06Z")

</div>

I’m currently at Lecture #7.5 (Defining Many-to-Many Relationships). Here, Mosh has defined the User-Tag relationships using the Set interface stating that users won’t have duplicated tags and vice versa. However, previo…

---

## [Spring boot courses - database choice for install](https://forum.codewithmosh.com/t/spring-boot-courses-database-choice-for-install/72199)

<div class="topic-metadata">

**Author:** [@chucky](https://forum.codewithmosh.com/u/chucky)\
**Replies:** 1\
**Last updated:** [February 1, 2026, 10:16pm UTC](https://forum.codewithmosh.com/t/spring-boot-courses-database-choice-for-install/72199 "2026-02-01T22:16:59Z")

</div>

Maybe it would be lighter-weight on PC resources to use the H2 in-memory database instead of MySQL. But I’m not sure, maybe that’s a bad idea, if I’ll run into problems if I try it. On the other hand if the database engi…

---

## [Kafka streams with Java](https://forum.codewithmosh.com/t/kafka-streams-with-java/71948)

<div class="topic-metadata">

**Author:** [@Bhuvanesh](https://forum.codewithmosh.com/u/Bhuvanesh)\
**Replies:** 0\
**Last updated:** [December 7, 2025, 3:42pm UTC](https://forum.codewithmosh.com/t/kafka-streams-with-java/71948 "2025-12-07T15:42:20Z")

</div>

I am .Net developer, but I need to use Kafka streams with Java, can you please help me here to how start with Kstreams to gain a deeper knowledge ?

---

## [IntelliJ Access Code](https://forum.codewithmosh.com/t/intellij-access-code/71776)

<div class="topic-metadata">

**Author:** [@uma\_mani](https://forum.codewithmosh.com/u/uma_mani)\
**Replies:** 0\
**Last updated:** [November 4, 2025, 11:21am UTC](https://forum.codewithmosh.com/t/intellij-access-code/71776 "2025-11-04T11:21:37Z")

</div>

Hello, I am a new user and very new to programming. I tried to install IntelliJ idea and JDK. there was a slide in the course with a code for intelliJ free access. is it necessary that we need to activate that one. have…

---

## [Run spring-api-starter to get can't find symbol error](https://forum.codewithmosh.com/t/run-spring-api-starter-to-get-cant-find-symbol-error/71518)

<div class="topic-metadata">

**Author:** [@a.madhu](https://forum.codewithmosh.com/u/a.madhu)\
**Replies:** 3\
**Last updated:** [October 22, 2025, 7:00pm UTC](https://forum.codewithmosh.com/t/run-spring-api-starter-to-get-cant-find-symbol-error/71518 "2025-10-22T19:00:17Z")

</div>

why we get a exception to run spring boot application ?

---

## [Source code for this course](https://forum.codewithmosh.com/t/source-code-for-this-course/71711)

<div class="topic-metadata">

**Author:** [@ivan999](https://forum.codewithmosh.com/u/ivan999)\
**Replies:** 0\
**Last updated:** [October 19, 2025, 7:08pm UTC](https://forum.codewithmosh.com/t/source-code-for-this-course/71711 "2025-10-19T19:08:26Z")

</div>

Where is the source code for this course? can’t find it

---

## [Java course part 4](https://forum.codewithmosh.com/t/java-course-part-4/71581)

<div class="topic-metadata">

**Author:** [@Darmok](https://forum.codewithmosh.com/u/Darmok)\
**Replies:** 0\
**Last updated:** [September 24, 2025, 8:11am UTC](https://forum.codewithmosh.com/t/java-course-part-4/71581 "2025-09-24T08:11:39Z")

</div>

Hi Mosh, Thanks for the courses series on Java. I enjoy it, love your style it’s clearly explained, with lot of examples and practice. That’s why I am asking in part 1 you mentioned that there will be part 4 - Mastery o…

---

## [Spring boot : intellij ultimate subscription](https://forum.codewithmosh.com/t/spring-boot-intellij-ultimate-subscription/71517)

<div class="topic-metadata">

**Author:** [@a.madhu](https://forum.codewithmosh.com/u/a.madhu)\
**Replies:** 0\
**Last updated:** [September 15, 2025, 5:05am UTC](https://forum.codewithmosh.com/t/spring-boot-intellij-ultimate-subscription/71517 "2025-09-15T05:05:51Z")

</div>

hey mosh intellij idea ultimate subscription is not aviable in spring boot part 2 course.

---

## [Can you send me some more problems to do in java which are intermediate. Because I am a beginner](https://forum.codewithmosh.com/t/can-you-send-me-some-more-problems-to-do-in-java-which-are-intermediate-because-i-am-a-beginner/71485)

<div class="topic-metadata">

**Author:** [@Harsha\_Vardhan526](https://forum.codewithmosh.com/u/Harsha_Vardhan526)\
**Replies:** 0\
**Last updated:** [September 9, 2025, 1:47pm UTC](https://forum.codewithmosh.com/t/can-you-send-me-some-more-problems-to-do-in-java-which-are-intermediate-because-i-am-a-beginner/71485 "2025-09-09T13:47:22Z")

</div>

Send me some more problems through mail

---

## [InstanceOf instead of switch case in CheckoutController](https://forum.codewithmosh.com/t/instanceof-instead-of-switch-case-in-checkoutcontroller/71474)

<div class="topic-metadata">

**Author:** [@tclaus](https://forum.codewithmosh.com/u/tclaus)\
**Replies:** 1\
**Last updated:** [September 7, 2025, 7:00pm UTC](https://forum.codewithmosh.com/t/instanceof-instead-of-switch-case-in-checkoutcontroller/71474 "2025-09-07T19:00:08Z")

</div>

Hi Mosh - Thanks for this great course series. I absolute like your style - for me it’s the best way to learn things I did not know until now. BTW: In “Spring Boot: Mastering REST API Development”, “Payment Processing…

---

## [What can I do to access my Course](https://forum.codewithmosh.com/t/what-can-i-do-to-access-my-course/71281)

<div class="topic-metadata">

**Author:** [@Nassif](https://forum.codewithmosh.com/u/Nassif)\
**Replies:** 5\
**Last updated:** [August 19, 2025, 2:48pm UTC](https://forum.codewithmosh.com/t/what-can-i-do-to-access-my-course/71281 "2025-08-19T14:48:57Z")

</div>

I purchased a Course last week but I can’t access it. I sent an email to teachable support but it doesn’t look like I will be helped. After reading through messages here, I’ve realised that so many people went through th…

---

## [How to automation testing with a Console Application with already test cases set?](https://forum.codewithmosh.com/t/how-to-automation-testing-with-a-console-application-with-already-test-cases-set/12794)

<div class="topic-metadata">

**Author:** [@snackboi](https://forum.codewithmosh.com/u/snackboi)\
**Replies:** 2\
**Last updated:** [July 29, 2025, 10:53am UTC](https://forum.codewithmosh.com/t/how-to-automation-testing-with-a-console-application-with-already-test-cases-set/12794 "2025-07-29T10:53:31Z")

</div>

I just complete a Java CONSOLE application for Student Management. I received a test case set (pdf file contains lines follow according to the requirements of the application) build based on the standard program (from m…

---

## [This code calculate the frequency of the array, please explain the dry run of the both for loop in the code](https://forum.codewithmosh.com/t/this-code-calculate-the-frequency-of-the-array-please-explain-the-dry-run-of-the-both-for-loop-in-the-code/71198)

<div class="topic-metadata">

**Author:** [@deepeshsuthar](https://forum.codewithmosh.com/u/deepeshsuthar)\
**Replies:** 3\
**Last updated:** [May 24, 2025, 9:53am UTC](https://forum.codewithmosh.com/t/this-code-calculate-the-frequency-of-the-array-please-explain-the-dry-run-of-the-both-for-loop-in-the-code/71198 "2025-05-24T09:53:31Z")

</div>

import java.util.Scanner; public class freqArr { public static void main(String args) { Scanner sc = new Scanner(System.in); System.out.println("Enter the length of the array: "); int size = sc.nextInt();…

---

## [Spring Boot part 2 - Deployment failed](https://forum.codewithmosh.com/t/spring-boot-part-2-deployment-failed/71197)

<div class="topic-metadata">

**Author:** [@qiqiliang](https://forum.codewithmosh.com/u/qiqiliang)\
**Replies:** 0\
**Last updated:** [May 15, 2025, 2:45am UTC](https://forum.codewithmosh.com/t/spring-boot-part-2-deployment-failed/71197 "2025-05-15T02:45:33Z")

</div>

I am on Spring Boot Part 2 - Deployment. When I tried to deploy on Railway, it said “Deployment Crashed OOM”. Does anyone has the same issue?

---

## [Specification Criteria - Spring Boot Part 1](https://forum.codewithmosh.com/t/specification-criteria-spring-boot-part-1/71185)

<div class="topic-metadata">

**Author:** [@raedgeorge](https://forum.codewithmosh.com/u/raedgeorge)\
**Replies:** 0\
**Last updated:** [April 27, 2025, 8:25pm UTC](https://forum.codewithmosh.com/t/specification-criteria-spring-boot-part-1/71185 "2025-04-27T20:25:22Z")

</div>

Specification\<\> is immutable, and() returns a new object combining the previous ones. so we need to re-assign. i found that when i added the inCategory() in the ProductSpec class. public void fetchProductsBySpecs(Stri…

---

## [ChatGPT and interface fields/methods](https://forum.codewithmosh.com/t/chatgpt-and-interface-fields-methods/71174)

<div class="topic-metadata">

**Author:** [@SuprchrgedSi](https://forum.codewithmosh.com/u/SuprchrgedSi)\
**Replies:** 1\
**Last updated:** [April 13, 2025, 9:44pm UTC](https://forum.codewithmosh.com/t/chatgpt-and-interface-fields-methods/71174 "2025-04-13T21:44:42Z")

</div>

Going through part2 of the Java course and it seems that ChatGPT is out of alignment with Mosh’s thinking on fields and static methods for interfaces. I completely get what Mosh is saying and tend to lean towards his wa…

---

## [Java serialization/de-serialization](https://forum.codewithmosh.com/t/java-serialization-de-serialization/30506)

<div class="topic-metadata">

**Author:** [@dppraveen](https://forum.codewithmosh.com/u/dppraveen)\
**Replies:** 0\
**Last updated:** [December 13, 2024, 4:45pm UTC](https://forum.codewithmosh.com/t/java-serialization-de-serialization/30506 "2024-12-13T16:45:48Z")

</div>

I have a Post request from a Rest API. When the request is received in the resource endpoint. The request is empty. It is not able deserilize the request and i get an empty object in the request. Can anyone suggest me an…

---

## [I\` m a beginner with JAVA and I need help with this Project](https://forum.codewithmosh.com/t/i-m-a-beginner-with-java-and-i-need-help-with-this-project/1454)

<div class="topic-metadata">

**Author:** [@Osnic](https://forum.codewithmosh.com/u/Osnic)\
**Replies:** 2\
**Last updated:** [March 29, 2024, 6:33pm UTC](https://forum.codewithmosh.com/t/i-m-a-beginner-with-java-and-i-need-help-with-this-project/1454 "2024-03-29T18:33:57Z")

</div>

Please guys I really need help, it should be easy for you guys. @programmingwithmosh Thank you in advance.

---

## [How many lines of code is too many in a method - Java Advanced Course](https://forum.codewithmosh.com/t/how-many-lines-of-code-is-too-many-in-a-method-java-advanced-course/28442)

<div class="topic-metadata">

**Author:** [@neonlights](https://forum.codewithmosh.com/u/neonlights)\
**Replies:** 2\
**Last updated:** [November 2, 2024, 4:22pm UTC](https://forum.codewithmosh.com/t/how-many-lines-of-code-is-too-many-in-a-method-java-advanced-course/28442 "2024-11-02T16:22:50Z")

</div>

Hello, I have a question regarding the number of lines of code in a method. Mosh mentioned that having more than 10 lines of code in a method is generally considered bad practice and suggested that we should aim to redu…

[Next page](https://forum.codewithmosh.com/c/java/7.md?page=1)
