Java Community | Help. Code. Learn.

JCH

Java Community | Help. Code. Learn.

With more than 25,000 members, join one of the biggest and most active Java Communities on Discord! ☕

Join

java-help

❓︱qotw-answers

What is wrong with this code?

I need help with my code

Javafx issue

I have been working on a java fx project, but to launch it I have to call it from a secondary main function. Now the issue is it gives me an error that I can ignore but it just is triggering seeing it pop up in the background. I believe it has to do with a missing folder/file but I can't find it
No description

Output Characters

Currently confused as to why there are actual "character" blocks being printed out with my String input result. ```java public static void main() { String turtles = convertToWhale("Normal Classes and Turtles be Turtling");...
No description

Query with SSM

Hi im trying to write a compiler and initially im focusing on building a simple stack machine code from its corresponding LPL programs. If needed dm me so i can show u my AST classes in my package. There is an error in the terminal but im unsure on how to rectify it pls help.

please clarify this question

is what the first part of this question asking basically to create a few files and then be able to call them up? so maybe following a tutorial like this https://www.youtube.com/watch?v=7fC9nL3_AQQ to create a few files and store them in a List and then be able to call them up from the List?
No description

Problems in a Cryptography assignment problem

I've shared 3 files which I'm using for the assignment, which are Client.java, Server.java & RSAKeyGen.java. Upon running the command for Client, I get this persistent error: java Client.java localhost 6800 Harish Harish Enter command (ls, get filename, bye): ls...

Java

How can java work with syntax and concepts

whats the point of OOP encapsulation?

hey guys. i was wondering if smb could help me out? im tired of reading countless articles that are copy pasted from each other so maybe a person and not a bot can explain stuff to me. in all the textbooks its said that "muh encapsulashun" is data hiding (whatever that means), using private fields, getters and setters. so now i have some questions: 1. who are we hiding the data from? lets say i have this: ```java class Book { public String author;...

How to combine Left Join Fetch with specification

`public interface PersonRepository extends JpaRepository<Person, Integer>, JpaSpecificationExecutor<Person> { @Lock(LockModeType.PESSIMISTIC_WRITE) Optional<Person> findWithLockingById(Integer id); @Query("SELECT p FROM Person p LEFT JOIN FETCH p.positions")...

how does open-closed principle really work?

hey guys. i have a question an id like to hear other opinions. lets say i have this.: ``` public class MyService{ //class fields, getters, setters public myServiceMethod(Car car){...

Spring Boot, JavaScript fetching Endpoint

Hi, my method getSeconds() is not invoked. `@PostMapping("/get-seconds") public ResponseEntity<Integer> getSeconds(@RequestBody ModulUpdateRequest request) { log.info("called get-seconds");...

Cannot invoke "jakarta.persistence.EntityManagerFactory.createEntityManager()" "this.emf" is null

I mapped my classes and transformed it in tables for my database. When I try to create a register I get this error. How I should to initialize emf? ``` Exception in thread "main" java.lang.NullPointerException: Cannot invoke "jakarta.persistence.EntityManagerFactory.createEntityManager()" because "this.emf" is null at org.persistence.RolJpaController.getEntityManager(RolJpaController.java:30)...

SpringBoot Is it possible to add a Object with it's attributes into another Object using forms ?

To understand better the question imagine ur trying to add a product, u choose it's category and name and description, now u want to add it's productVariants too, is it possible to do this within the same form or should just I use a different one

Best Java IDE

I am gonna to learn java, and my current OS is Ubuntu 22.04. What is the best tool or kit for java development?...

Java processing

Im struggling to export this code as svg

Java+Spring VS NodeJs VS GoLang Vs Laravel

Hello to everyone,, great to see a wonderful community totally focused towards JAVA... I had some questions, thought to ask... The question is related to...

java language as backend developer

It is sufficient language for backend developer or i have to add multiple languages

Combine multiple images into a grid format with Java

I am trying to make a 2 x 4 grid view and i need to start arranging images from left to right. i have the paths inside a List<String>

help my code wont run

im useing intellij and cant get this to run
No description
Next