post your code in this forum, don't link to it.
Type: Posts; User: camel-man
post your code in this forum, don't link to it.
What have you tried? What technologies are you using? Regular servlet/jsp, spring/springmvc?
What do you think will happen when the outter for loop is on it's last iteration... the inner for loop is going to start at an index 1 past the length of the array.
Remember that indexing an array...
What do you mean increment slabType? that is of String[].. which you cannot increment.
if you make it into a method than you can convert the two numbers into a string and return the String. Instead of returning two numbers
My advice would be set aside a method for each case. For example do a method for checking if the cards are a straight, do another method checking if they are full house.. so on so forth. It will help...
What have you tried so far?
EDIT: I realized that you are leaving the newline character in the buffer.
To fix it, put a userInput.nextLine(); after "what you wanna know?"
you would just leave it empty...
if(space)
do nothing
else
do the normal code
then do nothing.
What do you mean a redline? Where are your if / else statements for error checking? You should be able to check if windSpeed is out of range or Temperature is out of range.
add in an if statement, saying if charAt(i)==' ' (a space) then move to the next one. Basically, just ignore spaces.
Not quite, you're getting closer though.
they are the values that you put in. q and p are just the indexes. So if you have an array that you put 5 integers in say they were
values = 2, 90, 6, 100, 8
and value of q is 0, Then values[q]...
https://www.youtube.com/watch?v=ZcTgmKtvSQ4
This will help explain nested loops better.
You're going to want to start with the first loop, then the second loop, then the if statement.
Do you know how for loops work?
Look into nested loops . The inner code of the outter loop will go (inner loop * outter loop) times.
Do what Norm suggested, write down the values each time through the loop and post what you think they are here.
take each piece one at a time.
Ill help you get started
int values[] = new int[5];
int z;
for (int i = 0; i<5; i++){
values[i]=Integer.parseInt(JOptionPane.showInputDialog("Ent er...
Get out a piece of paper and write down all the variables and their values, Step through each step slowly and write down the values accordingly. That's the best way to do a desk check.
What have you got down so far?
You need to accept a String as the first parameter in your method
You have the right idea, but you want something like this
public static void printStrings(String abc, int number) {
for (int i...
You aren't giving another any value are you? You are putting it in the while loop as a condition before giving it a value//
Why don't you post your full code. What is "another"?
Well first you have both the print loops one after the other. You want to put the first loop to print the arrays unsorted before the actual sorting code. Then, after you do the sort, print out the...
try changing all the else if statements, to just if statements. That way nothing will get skipped over.