# Search:

Type: Posts; User: dx2731

1. ## Thread: Whats wrong with this for loop?

by dx2731
Replies
7
Views
557

### Re: Whats wrong with this for loop?

Sorry, I still dont understand. how does it simplify the code? and how is any calculations associated with the helper?

--- Update ---

2. ## Thread: Whats wrong with this for loop?

by dx2731
Replies
7
Views
557

### Re: Whats wrong with this for loop?

Okay now I have this code:

public class climate
{
public static void main(String[] args)
{
//constants for calculating emissivity
final double SOLAR_CONSTANT = 1367;...
3. ## Thread: Whats wrong with this for loop?

by dx2731
Replies
7
Views
557

### Re: Whats wrong with this for loop?

I figured it out now. I guess our lecturers dont make themselves very clear :/
4. ## Thread: Whats wrong with this for loop?

by dx2731
Replies
7
Views
557

### Whats wrong with this for loop?

I have this code here:

for(C0 = 280.0; C0 <= 400.0; C0 = C0 += 5)
{
Carbondep = A + B*Math.log(C0/PRE_CARBON);

//formula to calculate...
5. ## Thread: User Input help

by dx2731
Replies
3
Views
484

### Re: User Input help

I dont have anything at the moment because I dont know where to start. So being quite specific, I need an example of the code that will get user input, A specific word such as apple. The the program...
6. ## Thread: User Input help

by dx2731
Replies
3
Views
484

### User Input help

I wish to know how I can allow a user to input a name, and 2 numbers (such as 0.5 and 1234.0) and the code returns an answer.
I have the rough idea as:

get user input
search
retrieve and print...
7. ## Thread: making a return for a game

by dx2731
Replies
3
Views
518

### Re: making a return for a game

I know its missing, its just the part of the code I dont know what to put in it. like How do I get it to score each player with those numbers. As I said, even when writing down I have no clue
8. ## Thread: making a return for a game

by dx2731
Replies
3
Views
518

### making a return for a game

I have this dilema
• Players simultaneously choose a move: ‘c’ or ‘d’
• If both choose ‘c’, they get \$3 each
• If both choose ‘d’, they get \$1 each
• If one chooses ‘c’ and one chooses ‘d’, the...
9. ## Thread: Scanner closed error

by dx2731
Replies
6
Views
3,138

### [SOLVED] Re: Scanner closed error

Thankyou so much! Now I see what I did wrong xD
The code works as it should :) :) :)
10. ## Thread: Scanner closed error

by dx2731
Replies
6
Views
3,138

### [SOLVED] Re: Scanner closed error

How would this look in my code above?
Because I have tried and it doesnt work. I might be doing something wrong.
11. ## Thread: Scanner closed error

by dx2731
Replies
6
Views
3,138

### [SOLVED] Re: Scanner closed error

Sorry, I had the original file and now all i need is how to get a message displayed when there is no match in the file. I put something like this as a test:

...
12. ## Thread: Scanner closed error

by dx2731
Replies
6
Views
3,138

### [SOLVED] Scanner closed error

What would be the problem with this code?

import java.io.*;
import java.util.Scanner;

/**
* Write a description of class capital here.
*

by dx2731
Replies
5
Views
2,353

### Re: java.util.NoSuchElementException: null (in java.util.Scanner) Need help please?

Im doing the same assignment, same error

by dx2731
Replies
2
Views
359

### Boolean help

I need to use a boolean variable to keep track of whether any countries were found, and then check this with an “if”
statement at the end within this code.

import java.io.*;
import...
15. ## Thread: Help with class, interface, enum

by dx2731
Replies
9
Views
1,092

### Re: Help with class, interface, enum

I fixed my problem and everything works now.
16. ## Thread: Help with class, interface, enum

by dx2731
Replies
9
Views
1,092

### Re: Help with class, interface, enum

I've tried and I still get the same error, Could you help edit and check please?

--- Update ---

I now have this code, still same error:

import java.util.Scanner;
/**
17. ## Thread: Help with class, interface, enum

by dx2731
Replies
9
Views
1,092

### Re: Help with class, interface, enum

Im sorry all I could find is this, and it not even close to what you have:

Class documentation
-author
-version...
18. ## Thread: Help with class, interface, enum

by dx2731
Replies
9
Views
1,092

### Re: Help with class, interface, enum

How do I do this? There is no text. I get this though:

1930
19. ## Thread: Help with class, interface, enum

by dx2731
Replies
9
Views
1,092

### Re: Help with class, interface, enum

I dont know how to do this... Im writing the program with blue j.
its the line here thats the issue:

private static(problem here) boolean ask(String question, Scanner keyboard)

I know for...
20. ## Thread: Help with class, interface, enum

by dx2731
Replies
9
Views
1,092

### Help with class, interface, enum

I just finished this guessing game and I have completed the first part
and compiled it with no errors and works. Then I did the same with the...
21. ## Thread: Guessing game help

by dx2731
Replies
5
Views
1,103

### Re: Guessing game help

I got the program, will be asking for help in whats wrong with my code, thankyou for the help
22. ## Thread: Guessing game help

by dx2731
Replies
5
Views
1,103

### Re: Guessing game help

and also i have two public static void main(String[] args) in my code sorry.
23. ## Thread: Guessing game help

by dx2731
Replies
5
Views
1,103

### Re: Guessing game help

Please could you give a sample of one of my paths? because i have tried everything and when i test it, it just doesnt work. especially because i cant get past three questions and three animals :(
24. ## Thread: Guessing game help

by dx2731
Replies
5
Views
1,103

### Guessing game help

Been made to do this task where I need to make an animal guessing game using if-else. I cannot figure out how to make this code so it will add more than four animals. The game is basically

Think...
Results 1 to 24 of 24