hashmap tag

13 questions


1 answers
483 views
0
Please tell me what object is used to redefine equals in HashMap.

javapackage sec01.verify.exam03;public class Student {private String studentNum;public Student(String studentNum) { this.studentNum = studentNum;}public String getStudentNum() { return studentNum;}@O...

1 years ago

1 answers
183 views
0
What do you do with HashMap when you turn the repeat door?

You want to check the data of an object in HashMap How do I turn the repeat statement on HashMap?

2 years ago

1 answers
106 views
0
How do I update the value with the key value in Java hashMap?

Assuming there is a HashMap, how do I find the value of Integer as the string key value and update the value? The way to remove the existing value and enter a new one is concerned about overhead. The ...

2 years ago

1 answers
159 views
0
How do I maintain the insertion order of the HashMap?

I'm using HashMap. Whenever I repeat the map, I receive the data in random order even though I put it in sequential order. I need to get it sequentially, what should I do?

2 years ago

1 answers
145 views
0
Can I sort the map by key value in Java?

<question1, 1>, <question9, 1>, <question2, 4>, <question5, 2>I made a map that has this kind of data. I want to arrange the key value in question 1, question 2, question 3. In...

2 years ago

1 answers
86 views
0
Is it better to use a comma as? after try-exception?

Usually from exceptiontry: passexcept Exception, exception: passtry: passexcept Exception as exception: passThey use it in these two ways. Which one is the standard?The second source code is okay to r...

2 years ago

1 answers
111 views
0
Remove the key from the hash on Ruby/Rails and return only the remaining hash

After removing the key from the hash on Ruby/Rails, how can I get only the remaining hash returned?To add a new hash {:a => 1, :b => 2}.merge!({:c => 3}) # => {:a=>1, :b=>2, :c=>3...

2 years ago

1 answers
119 views
0
If indexOf does not find a value (always returns -1)

I posted a question before, but I couldn't, so I'm uploading it again.The first method is ArrayList<HashMap<String,String>> al = new ArrayList<>();al.add(hm); // hm is Hashmap<Str...

2 years ago

1 answers
169 views
0
Hashmap Values Using Repeat Statements

Code was written to give the key a value using a repeat statement.import java.util.ArrayList;import java.util.HashMap;import java.util.List;import java.util.Map;public class Solution { public static v...

2 years ago

1 answers
135 views
0
Why does Java's HashMap produce output like this?

public class CHashMap { static HashMap<Integer, Student> student = new HashMap<Integer, Student>(); public static void main(String[] args) { student.put (1111, new Student (Kim Ye-si, 3rd...

2 years ago
- 1 - »

© 2024 OneMinuteCode. All rights reserved.