
Reddit » Java Help
1,000 FOLLOWERS
Enjoy talking with like-minded people, and help them expand their knowledge of java code. Post here your programming-related issues, recommend java courses or books, and more.
Reddit » Java Help
21m ago
Hi everyone, I'm starting to study AOP in Java and I would like an advice.
I’m currently working on a Job from a Spring Batch application, in this Job I will do a select on the database and find X records, these records will have a STEP that represents in which step inside the Job flow the record is currently at and the Job will have Y steps that cannot be skipped (in order to end the job successfully the record must pass every single step).
At the moment I’m using a SWITCH without a break based on the record STEP so it “starts” when the record step is matched and end at the final step. T ..read more
Reddit » Java Help
21m ago
In dual monitor setup, Java returns different usable screen bounds for Windows 10 and11.
In Windows 10, Java returns unscaled usable bounds for the X and Y coordinates of a second display, and in Windows 11 it returns scaled bounds for X and Y coordinates.
submitted by /u/_dk7
[visit reddit] [comments ..read more
Reddit » Java Help
21m ago
I need to be able to print Flow Sample data in tab-delimited lines of text where each data field is separated by tabs. Using the tab-delimited lines I need to be able to type data in like:
Please enter the line of tab separated data: USGS 13206000 2021-12-30 14:30 MST 226 P
and have it printed out like:
--------------------- | Data Entry | --------------------- Please enter the line of tab separated data: USGS 13206000 2021-12-30 14:30 MST 226 P --------------------- | Data Confirmation | --------------------- You entered the following: Agency: USGS Site Number: 13206000 Local Timestamp ..read more
Reddit » Java Help
21m ago
Is this just asking for
public interface intername{methods headers}
submitted by /u/Pale-Marzipan-183
[visit reddit] [comments ..read more
Reddit » Java Help
21m ago
Help! My task is to create a quiz view player. My problem is displaying the scores in the 'RESULTS' JFrame from the 'QUIZ' JFrame.
My code for the 'QUIZ' JFrame is:
RESULTS sc1 = new RESULTS();
RESULTS.txt_score1.setText(String.valueOf(score1));
sc1.setVisible(true);
new TRUEORFALSE().setVisible(true);
this.dispose();
It shows on the 'RESULTS' JFrame but, it only shows for one second; it does not stay. How can I make it stay?
Note: this Quiz View Player has three sets of a quiz, so when the scores show up in the 'RESULTS' JFrame, I still have to add those scores for the total score. It ..read more
Reddit » Java Help
16h ago
Hello everyone, i have an extra credit assignment due for biology tomorrow. the task is to make a 256 box punnett square, which i did already, but i must find all possible phenotypes. i am too lazy to do it so i am coding the answer. It works, but it doesnt work. i need it to count the number of genotypes so i can do the phenotypes, but it is saying i have one of each. please help
Here is the code...
public class MyClass {
public static void main(String args[]) {
String p1 = "AaBbCcDd";
String p2 = "AaBbCcDd";
String[] p1combo = {"ABCD", "ABCd", "ABcD", "AbCD", "ABcd", "AbcD", "AbCd", "Abcd ..read more
Reddit » Java Help
16h ago
Doing a micronaut application and all these different libraries for data fetching from a db is just melting my brain.
I have it connected to a postgres db and are trying to make a simple join to get each EntityA as a property in EntityB based on the same column value (an ID). They do not hold actual row ids to each other in the db. Pretty much a simple "where id is the same as this id from this table".
From the documentation I get a bunch of annotations. Some from micronaut data, some from JDBC, some from JPA and Hibernate, and to be honest. This seems like a damn frankenstein monster where t ..read more
Reddit » Java Help
16h ago
I was trying to follow some youtube guide ("Java full Course for free" by "Bro code"). I created new project and class for it. But when i try to compile and run I only see error like
"Error: Could not find or load main class projekt.Main
Caused by: java.lang.ClassNotFoundException: projekt.Main"
or
"Unbound classpath container: 'JRE System Library [JavaSE-19]' in project 'project'
Im very shy asking for help. But yeah, I think, alone I won't figure it out.
submitted by /u/tyman3400
[visit reddit] [comments ..read more
Reddit » Java Help
1d ago
Write a java program that takes 3 inputs:
• A strings, consisting of only digits. ( You don't need to check that. Assume the user enters it right)
• A number p, representing a patch number
• A number d, representing a divisor.
Your program should process the string in patches of size p, and checks if all patches are divisible by d or not. If so, it outputs true, otherwise it outputs false.
PS. You are not allowed to use substring() method.
Examples:
Case
S="846738" p=2d=2
Output:
False.
S="846738" p=3 d=2
Output:
True.
5="846738" p=5 d=2
Output:
Incompatible
here's my code which i know is wro ..read more
Reddit » Java Help
1d ago
here's the question :
Write a program that takes two strings s1 and s2 as inputs and checks whether string s1 is a substring in string s2. Example:
s1 = "abc"
s2 = "ababc" Output: true
s1 = "a"
s2 = "ababc" Output: true
s1 = "abc"
s2 = "ababa" Output: false
here's my code(there are no syntax errors however it keeps on printing false in all cases)
import java.util.*; public class Main{ public static void main (String[] args) { Scanner sc = new Scanner(System.in); System.out.print("enter the first string: "); String s1 = sc.nextLine(); System.out.print("enter the second string: "); String s2 ..read more