Two things:
a) Now I've made the code into a single method in a larger program, I don't know where to put the
.
b) I can't work out exactly how to use .get() to make the value of a string (yes it must me a string, at least eventually) the value of a data item under a specific key. Basically, it won't compile when I use:
This code isn't quite complete yet, but I don't want to add more until I can get this bit working.
a) Now I've made the code into a single method in a larger program, I don't know where to put the
Code:
java.lang.Exceptionb) I can't work out exactly how to use .get() to make the value of a string (yes it must me a string, at least eventually) the value of a data item under a specific key. Basically, it won't compile when I use:
Code:
public void formatFrequencies()
{
//Formats the data in the HashMap into a .csv file Excell can open.
frequencyTable = frequencyTable+newLine;
String currentFrequency = "0";
for(char currentLetter : alphabet.toCharArray())
{
currentFrequency = frequencyMap.get(currentLetter);
system.out.println(currentFrequency);
}
}This code isn't quite complete yet, but I don't want to add more until I can get this bit working.
OS: Windows 10 64 bit Professional
CPU: AMD Ryzen 5900X
RAM: 16GB
GPU: Radeon Vega 56
CPU: AMD Ryzen 5900X
RAM: 16GB
GPU: Radeon Vega 56
