Is it possible i am wasting my time learning Java ?
What I mean is..... Is there a genuine possiblity that in a couple of years time, the demand for Java could decline significantly and other...
Type: Posts; User: djl1990
Is it possible i am wasting my time learning Java ?
What I mean is..... Is there a genuine possiblity that in a couple of years time, the demand for Java could decline significantly and other...
I understand it now, it compares the first one, if equal, moves to the next.
I was looking at 'Method Summary' I hadnt scrolled Down and seen all the ''Method Detail'' for each method.
Anyhow, having read it, i understand it compares each index. My issue is why is it...
Hi all,
I am just working through all the methods for String in java.
I am on compareTo at the moment but have to say i dont really know what it does, i have a small working program here to...
Thanks i have had a go at it.
The program runs as i wanted but it is throwing an exception at the end of it:
Here is the code:
Hi,
I want to read in a word from the user and split the string up into each individual characters, and print the individual characters.
What classes/methods do i need for this ?
They appear to be correctly paired
I should also add 'sleep' is yellow underlined and it says 'Thread.sleep called in loop'
--- Update ---
Update:
All fixed. Thanks for your help.
Having added the try catch block i have the following:
package latesttasks;
// Count and Print 1 to 10 in Real Time.
// Threads
import java.util.*;
public class task15 {
Seems like you havn't specified what package it should be in.
Here is the full error:
regards.
Ok cheers,
had a quick look around and a quick think and only thing i came up with is this:
public static void main(String[] args) {
String[] passwords = new String[]{"rose77",...
It doesnt seem to like this:
public static void main(String[] args) {
for (int counter = 1; counter <= 10; counter++){
System.out.println(counter);
...
I also watched Bucky's tutorials, Beginner and Intermediate, im surprised he hasnt / in the process of doing an advanced set.
Ok,
So what i want to do is read in a String from the user and test to see if the inputted String is equal to one of the Strings that exist in a String array that i have created.
Here is what...
Thanks so for the first character it would be:
c1 = characters[r1];
What i want to do is generate a random 8 digit password consisting of 8 characters.
The possible characters would be 0-9 and a-z.
Here is what i have so far but i will warn you i think i am...
Hi all,
I have created a Mobile Number Generator.
Here are the requirements:
- Number always starts with 07
- Number must be 11 Digits long
- Remaining 9 digits to be generated 0-9
-...
Hi all, I have created a basic guessing game as follows:
package latesttasks;
// Create a basic guessing game, user has to guess 1 - 10, system prints
// higher, lower, or correct. When...
Hi all,
I need to make a Program that once the user clicks run, the Program prints out 1 to 10 with a second gap in between so it actually prints out in real time:
The output would just be:
...
I did say some If and Else's were muddled as were some curly brackets.
I also advised to Format his code and delete unnecessary large spaces which will make it easier for future problems.
There...
I have had a go at tidying it all up. Some of your if and if else statements were muddled and some curly brackets needed altering.
I have never seen so many if and else statements to be honest...
Here was the error i was getting:
--- Update ---
Thanks for the advice CosmicCode. I added the while true parts and break statement so now have this:
Hi all,
I am struggling with a small program which calculates an employee's payment due.
Some basic points:
* Min Wage as 6.21
* Hours over first 40 is payed at 1.5
* Program should output...
I think you would need i-- somewhere in there to decrement the integer one at a time.
Is that what you want to do, so say 10 is entered you want to print, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0
Or
...
Could you not use a switch statement for the letter choices and have the default case print "invalid selection"