No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
I have a HashMap with String keys and Integer values. I want to get a string with the String keys in numerical order of their String values. eg. if I have Orange=1 apple=4 pear =2 grapefruit=3 I want the following String apple, pear, grapefruit, orange. I'm not sure how to … |
|
Re:
I'm trying to write a simple program to identify if two phrases are anagrams of one another. I'm having trouble with sorting an array of characters and defining xarray and yarray. [code] public class Anagram1{ private String x; private String y; private char[] xarray; //? private char[] yarray; //? public … |
|
I have a Java HashMap with String keys and Integer values. I need to produce a string which has the keys in the same order as their corresponding values sorted by numerically descending order. What are my options? |
|
Sorry if this has been asked before but I have tried to find a solution elsewhere. I am using the getline function to receive input from the keyboard and save it in a text file. The problem is that it insists on printing a null character (the square box thingy) … |
|
Re:
Hi, I have absolutely no clue how to implement Ascii color into a console program. I have tried google, but it only finds irrelevant things... ~thanks!!!!!~ Kodiak!!! |
|
Re:
here what I got and I keep getting a error because of the "string names[];" these were my guide lines and I'm getting confused //declare an array of datatype string //call it names[] //declare a function dataEntry that takes a string array as input void dataEntry(string arr[]); //implement the function: … |
|
Supposing I have a class Dog with attributes age and color. I also have a function print(string) which invokes the accessor functions for the dog attributes. Now when the user enters the name of a Dog object at the command line I would like to call the print function to … |