Skip to main content
0 votes
1 answer
83 views

I have tried using both base class and interface and in both instances I am told a constructor that takes my arguments does not exist. I have two classes that are related to each other and I want to ...
horsemeat's user avatar
-8 votes
0 answers
113 views

I need to create an arraylist, that contains an array of objects to act as the rows of a table, like this: ArrayList<Object[]> rows = new ArrayList<>(); each of these Object[] arrays will ...
Luna's user avatar
  • 1
0 votes
1 answer
146 views

How can I make an array of variables generated using the values passed through a while loop ? I am using osclass for a uni project and I find no way whatsoever to make a list os usable variables from ...
Rob Wall's user avatar
1 vote
1 answer
75 views

Consider the following simple ArrayList implementation: class ArrayListImpl<T(0)> { var xs: array<T> var n: nat predicate Valid() reads this { 0 <= n <= xs.Length } ...
JosEduSol's user avatar
  • 5,488
5 votes
3 answers
170 views

I'm currently filtering a Java List to keep approximately a percentage of its elements using a random approach: import java.util.List; import java.util.Random; public class Main { public static ...
user30654079's user avatar
1 vote
1 answer
93 views

My macro accurately creates 2 lists of numerical data based on which group (control or exposed) a subject is in. Dim Subjects As Integer Subjects = Sheets("Participant Info").Range("C4:...
LyleBabcock's user avatar
1 vote
1 answer
70 views

I have a list of 36 subjects and their ages, and whether they are in the 'Control' or "Exposed" group. I am trying split this list into two based on what group they are in. The program ...
LyleBabcock's user avatar
3 votes
3 answers
360 views

How does cache locality impact the performance of ArrayList compared to LinkedList in Java? I've often heard that ArrayList has an advantage in terms of cache locality, but I don't fully understand ...
Marat Tim's user avatar
0 votes
1 answer
76 views

Concerning Javascript, I've been trying to understand backtracking lately and it's really confusing. Specifically, I've been trying to understand the permutation problem, which when given an array, we ...
ContravariantMind's user avatar
3 votes
2 answers
179 views

I'm working on an assignment where I need to take "books" from the user(a title, an author, and ISBN number, all strings), and store these books somehow, and then do various things to these ...
Bill H's user avatar
  • 33
1 vote
1 answer
51 views

I have a text property in a class that will contain multiple words along with other properties (index, linenumber, starttime, endtime). I have an arraylist (rawdata) of that class built. I need to be ...
James Parks's user avatar
1 vote
1 answer
86 views

I have created a void method which prints out the required responses from an url (using Java and Playwright) but I actually need to receive these values for making junit assertions and I am trying to ...
Mina's user avatar
  • 85
2 votes
3 answers
273 views

In some code from my company, I've read a list initialization: List<SomeClass> someClassList = new ArrayList<>(Collections.emptyList()) What does it mean? A list with 0 size ...
Corporativo's user avatar
0 votes
1 answer
66 views

For this assignment I'm supposed to test my quicksort class using a variety of different pivots and a variety of ArrayLists in different arrangements. The class works fine with a random pivot, or a ...
Drake's user avatar
  • 19
2 votes
3 answers
95 views

I have a Java code for booking movie tickets. In this program, each person can only buy two tickets, a maximum of 10 tickets are sold and at the end it displays a list with the names of the people. I ...
Cleyton Melo's user avatar

15 30 50 per page
1
2 3 4 5
2305