verbose
JCHJava Community | Help. Code. Learn.
•Created by verbose on 11/21/2024 in #java-help
How do I handle an assignment like this folder structure wise?
35 replies
JCHJava Community | Help. Code. Learn.
•Created by verbose on 5/16/2024 in #java-help
Would this Validation System work?
I have this validation system I wanted to implement for absolutely no reason what so ever other than waste my time but essentially it just validates objects that are going to be created. Say you are creating an class called
Tenant
and this tenant is using the builder pattern. before the Tenant object is created it would validate it which would look something like this: for the cove above its just a simple example of what you can do but it should work with different datatypes (primitive or reference) with their own set of rules.12 replies
JCHJava Community | Help. Code. Learn.
•Created by verbose on 12/3/2023 in #java-help
Communicating between multiple Controllers JavaFX FXML
6 replies
JCHJava Community | Help. Code. Learn.
•Created by verbose on 11/23/2023 in #java-help
Creating a REST API with oracledb
22 replies
JCHJava Community | Help. Code. Learn.
•Created by verbose on 10/16/2022 in #java-help
HashMap with Objects
I have created a HashMap that follows the pairing : and it functions as a data holder for most of the String: Object pairs I intend to add into it.
Purpose
I am creating a program that allows user input on determining whether a certain word is the correct opposite (antonym which is inputted by the user). For example, I would request the user to input the opposite of
absent
; The possibilities are as follows:
1.
or
2.
My code for creating the HashMap of <String, Object> pairs is as follows:
Question
How would I access anything within the List reference? If I were to check if user input is in fact one of the elements within the List, would I use contains()
within a if statement?
I appreciate all the help and support for anyone who can look into this!10 replies
JCHJava Community | Help. Code. Learn.
•Created by verbose on 10/15/2022 in #java-help
Obtain Value from nested Hashtable Map
I am creating a program that initially uses nested Hashtables in the format:
Purpose
The functionality of the nested hashtable is to hold values of 'common opposites' (antonyms for clarity). I have already structured most of the code to put values within the hashtable but I am having a difficult time figuring out how to obtain only values within the format of the nested hashtable. Here is how I placed values into the table (I put them in pairs of 2 for ease of readability):
I am not even sure if this is the best way to write code like this, however, I have tried using for loops with Entry, tried using built in functions and looked at examples like:
I am not sure how I would access them, if someone could explain to me the complexities of something like this, it would mean a lot!
24 replies