OK great, thank for your help
Type: Posts; User: dboxall123
OK great, thank for your help
I think i get it. Is this kind of like in C, where if say you send an array to a function, you're actually sending a pointer to the memory location of the first element? And when I assigned the array...
Hi,
I have a HashMap<Character, int[]> full of coordinates of letters in 5x5 table (char[5][5]), which I'm using for a cipher program I'm writing. Basically in order to encode each letter I take the...
Are there actually any moderators on this site? If so, why don't they delete the " Buy Registered and Unregistered Swiss, Austrian passports + id cards" posts that keep appearing daily lol?
Wage and wages were obviously just examples. And no, that wasn't what I meant. The exercise asks for an 'array of counters'. So, I think you need to set up an array, and each item of the array is set...
Right, so I think that the assignment is asking you to create an array to hold the count of each salary range, so you would need to create a second array, let's call it amountsPaid. The size of...
So you don't have to do any of the math, right? You just have an array of integers? So, for example,
int twoHundredTo299 = 0;
int threeHundredTo399 = 0;
for (int wage : wages) {
if...
Ah, I didn't realise that the second for loop was outside of the while loop, I was a bit confused by it.
That's even easier, just create some integer variables, all set to zero. Then loop through...
Well, if you fill the array up, until count < salesAmount.length, it should then exit the first for loop and move to the second, printing each item in the array. As for exiting the for loop when a...
Great, I'll read up on anonymous classes and lambda expressions, thanks Jim
Hi,
I'm going through java swing tutorials here, and there's a line I don't understand:
JButton button = new JButton("Click me");
button.addActionListener(new ActionListener() {
public...
For dynamically sized array, you could use ArrayList:
import java.util.Scanner;
import java.util.ArrayList;
class MyArray {
public static void main(String[] args) {
ArrayList<Integer>...
Hi everyone
Just thought I should introduce myself. I'm Dan, and I'm learning java from the Oracle Tutorials, which by the way, I'm finding really good, very detailed. I'm not joining this forum...