No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
6 Posted Topics
I am having trouble with stacks and infix and post fix this is my error: [COLOR="red"]Reading from file "input16.txt": Infix expression = (5) Exception in thread "main" java.util.EmptyStackException at ArrayStack.pop(ArrayStack.java:51) at test.infixToPostfix(test.java:140) at test.displayArray(test.java:87) at test.main(test.java:53)[/COLOR] this is the txt file: (5) (1+1) ((9/3)-2) (9-(3/2)) (1+(4-(9*(6/(5%7))))) ((1+4)-(((9*6)/5)%7)) (((1+(4-9))*6)/(5%7)) ((1+(2-3)) (1+(2-3))) … | |
[icode] import java.util.Scanner; import java.io.File; import java.util.StringTokenizer; import java.util.InputMismatchException; import java.io.FileNotFoundException; public class KashiwabaraNicole16test { /******************************************************************************* * Outputs integers from user input external files. ********************************************************************************/ public static void main( String[] commandlineArguments )throws NullPointerException { //Error Checking For Command Line Arguments.. if(commandlineArguments.length == 0){ System.out.println("Please enter the file name as the … | |
hi :) This program requires me to read user input from the commandline (a int and a string) and use recursion to print out the the first letter of the string x times based on the int user input: I have this so far, but it seems print out just … | |
The program requires an integer input from a user at the command args and prints out the numbers backward. I have this so far, however, it only prints 1 number, which is the number entered into args. [code=java] public class KashiwabaraNicole7 { /******************************************************************************* * Initializes program * @ param commandlineArguments … | |
Output should be as show below: and files are attached. 1. Here is example output for input file electricity.txt: number of integers in file "electricity.txt" = 4 index = 0, element = 1877 index = 1, element = 1923 index = 2, element = 1879 index = 3, element = … | |
I need help. I dont know what to do next to get the following output: groceries.csv: (file needed to input at command prompt (args)) Name, Number natto, 3 eggs, 12 shiitake, 1 negi, 1 garlic, 5 umeboshi, 1 (need to output as shown below): number of integers in file "groceries.csv" … |
The End.