Sorry for posting in the wrong section, i knew the code was not a loop, but i did not know it was a control statement. I'm not sure how you supposed to know these things when you're a total noob,...
Type: Posts; User: reddevilggg
Sorry for posting in the wrong section, i knew the code was not a loop, but i did not know it was a control statement. I'm not sure how you supposed to know these things when you're a total noob,...
When i run this code the 'else' output always displays. Why is that ??
import java.util.Scanner;
public class Post {
public static void main(String[] args) {
Scanner myKeyboard =...
Thank you both for your help, and due to your help i've done it . Thanks Again
I've tried the substring and this is the best i can do
The output is
Which shows the first initial, then first space +1 and second space +1. Then what is inclusive of the name...
There is going to be 2 spaces as i have to assume that the user input 3 names, first, middle and last name.
I've tried loads of things, nothing works for me, the longer i stay on this tutorial the...
This is it so far, i just do not understand what i need to do
import java.util.Scanner;
public class Initials {
public static void main(String[] args) {
Scanner input =...
Yeah, i've tried loads of ways, but being a beginner it's the syntax that lets me down. i'm not sure exactly what or how to get it correct. Everything i do either doesnt work or is an error.
I...
yeah, i understand the logic behind it. Thats as far as it goes. I been trying to include a char method, but i just keep get red errors. I'm lost.
i'm using the indexOf method because its part of a tutorial i'm following to make sure that i'm understanding how to use it (ironic, i know). It gives the poistion of the space +1, which will give...
I'm still having problems, as you can see in the code below, the output displays the first initial then the others as an int (number of spaces), i know i've got the code as an int, but this is the...
Cheers. i'll take a look
Thanks again
Sorry about not enclosing the code in tags.
You say
"Now find the space as there are many functions provided by String.
You can easily find the space and then get the index of that location. Add...
I've got this so far, but the program has to be for ANY name
import java.util.Scanner;
public class Initials {
public static void main(String[] args) {
Scanner input = new...
i'm trying to write a program that displays your initials after you input your full name, only using the string methods .
I'm at a loss, can anyone help ??
Thanks everyone :-)
I'm a Java beginner, i'm writing a simple program to convert pounds to euros, but i would like the output answer to be rounded up to 2 significant figures, can anybody help. here is the code
...
Started using Java today. i'm completly new to it. I'm trying to get ahead on my Uni course as Java starts next semester.