Search:

Type: Posts; User: reddevilggg

Search: Search took 0.39 seconds.

  1. Replies
    3
    Views
    439

    Re: not sure why the 'else is not working

    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,...
  2. Replies
    3
    Views
    439

    not sure why the 'else is not working

    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 =...
  3. Replies
    24
    Views
    779

    [SOLVED] Re: I'm a java beginnier

    Thank you both for your help, and due to your help i've done it . Thanks Again
  4. Replies
    24
    Views
    779

    [SOLVED] Re: I'm a java beginnier

    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...
  5. Replies
    24
    Views
    779

    [SOLVED] Re: I'm a java beginnier

    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...
  6. Replies
    24
    Views
    779

    [SOLVED] Re: I'm a java beginnier

    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 =...
  7. Replies
    24
    Views
    779

    [SOLVED] Re: I'm a java beginnier

    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...
  8. Replies
    24
    Views
    779

    [SOLVED] Re: I'm a java beginnier

    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.
  9. Replies
    24
    Views
    779

    [SOLVED] Re: I'm a java beginnier

    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...
  10. Replies
    24
    Views
    779

    [SOLVED] Re: I'm a java beginnier

    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...
  11. Replies
    24
    Views
    779

    [SOLVED] Re: I'm a java beginnier

    Cheers. i'll take a look

    Thanks again
  12. Replies
    24
    Views
    779

    [SOLVED] Re: I'm a java beginnier

    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...
  13. Replies
    24
    Views
    779

    [SOLVED] Re: I'm a java beginnier

    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...
  14. Replies
    24
    Views
    779

    [SOLVED] I'm a java beginnier

    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 ??
  15. Replies
    6
    Views
    1,084

    Re: Simple curency convertor

    Thanks everyone :-)
  16. Replies
    6
    Views
    1,084

    Simple curency convertor

    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
    ...
  17. Replies
    1
    Views
    231

    Hello everyone

    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.
Results 1 to 17 of 18