Search:

Type: Posts; User: Lukas

Page 1 of 2 1 2

Search: Search took 0.22 seconds.

  1. Thread: Random variant.

    by Lukas
    Replies
    64
    Views
    3,876

    Re: Random variant.

    I correct my program. No everything okey.
  2. Thread: Random variant.

    by Lukas
    Replies
    64
    Views
    3,876

    Re: Random variant.

    public void Authors(){
    scan = new Scanner(System.in);

    System.out.println("Please write the author: ");
    authors = scan.nextLine();
    System.out.println("Please write how much author...
  3. Thread: Random variant.

    by Lukas
    Replies
    64
    Views
    3,876

    Re: Random variant.

    I want that the program print me all books where I inserted.
  4. Thread: Random variant.

    by Lukas
    Replies
    64
    Views
    3,876

    Re: Random variant.

    Then why this is bad?
    anArray[0] = books;
  5. Thread: Random variant.

    by Lukas
    Replies
    64
    Views
    3,876

    Re: Random variant.

    Then how can I use the same "x" on my program?
    anArray[0] = 1;
    anArray[1] = 2;
    anArray[2] = 3;
  6. Thread: Random variant.

    by Lukas
    Replies
    64
    Views
    3,876

    Re: Random variant.

    public void Authors(){
    scan = new Scanner(System.in);

    System.out.println("Please write the author: ");
    authors = scan.nextLine();
    System.out.println("Please write how much author...
  7. Thread: Random variant.

    by Lukas
    Replies
    64
    Views
    3,876

    Re: Random variant.

    Can you give me the example?
  8. Thread: Random variant.

    by Lukas
    Replies
    64
    Views
    3,876

    Re: Random variant.

    public void Authors(){
    scan = new Scanner(System.in);

    System.out.println("Please write the author: ");
    authors = scan.nextLine();
    System.out.println("Please write how much author...
  9. Thread: Random variant.

    by Lukas
    Replies
    64
    Views
    3,876

    Re: Random variant.

    for(int i = 0; i < authors03; i++){
    System.out.println("Please write author books: " + authors);
    setBooks(scan.next());
    anArray = new String[1];
    }
    }
    public void result(){
    anArray[0]...
  10. Thread: Random variant.

    by Lukas
    Replies
    64
    Views
    3,876

    Re: Random variant.

    public class Authors2 {

    int authors03;
    String authors;
    int books2;
    Scanner scan;
    int[] anArray;
    private String books22;
    public void Authors(){
    scan = new Scanner(System.in);
  11. Thread: Random variant.

    by Lukas
    Replies
    64
    Views
    3,876

    Re: Random variant.

    I want that the program print me:
    You have entered these author books: Test1, Test2

    or:
    You have entered these author books: Test1
    You have entered these author books: Test2
  12. Thread: Random variant.

    by Lukas
    Replies
    64
    Views
    3,876

    Re: Random variant.

    Please write the author:
    Lukas
    Please write how much author books you want to write: Lukas
    2
    Please write author books: Lukas
    Test1
    Please write author books: Lukas
    Test2
    You have writed the...
  13. Thread: Random variant.

    by Lukas
    Replies
    64
    Views
    3,876

    Re: Random variant.

    He has main() method.

    public class Main {

    /**
    * @param args
    */
    public static void main(String[] args) {
    Authors2 book = new Authors2 ();
    book.Kiak();
  14. Thread: Random variant.

    by Lukas
    Replies
    64
    Views
    3,876

    Re: Random variant.

    import java.util.Scanner;

    public class Authors2 {

    int authors03;
    String authors;
    String books2;
    Scanner scan;
    public void Authors(){
    scan = new Scanner(System.in);
  15. Thread: Random variant.

    by Lukas
    Replies
    64
    Views
    3,876

    Re: Random variant.

    My post: http://www.javaprogrammingforums.com/whats-wrong-my-code/33348-whats-wrong.html
    When I starting program everything is okey, but when I inserting the books the program showed me the last...
  16. Thread: Random variant.

    by Lukas
    Replies
    64
    Views
    3,876

    Re: Random variant.

    Okey I change. Thanks.

    --- Update ---

    And can you help me in my post?:
    http://www.javaprogrammingforums.com/whats-wrong-my-code/33348-whats-wrong.html
  17. Thread: Random variant.

    by Lukas
    Replies
    64
    Views
    3,876

    Re: Random variant.

    And how can I correct it?
  18. Thread: Random variant.

    by Lukas
    Replies
    64
    Views
    3,876

    Re: Random variant.

    My program:

    package Dice;

    import java.util.Random;
    import java.util.Scanner;

    public class Dice {

    static int game;
  19. Thread: Random variant.

    by Lukas
    Replies
    64
    Views
    3,876

    Re: Random variant.

    In my program I have this:

    public void Turnnumber(){
    scan2 = new Scanner(System.in);
    System.out.println("Enter the desired number of turns");
    game = scan2.nextInt();
    scan2.nextLine();
    er =...
  20. Thread: Random variant.

    by Lukas
    Replies
    64
    Views
    3,876

    Re: Random variant.

    How can I insert that code in my program?
  21. Thread: Random variant.

    by Lukas
    Replies
    64
    Views
    3,876

    Re: Random variant.

    Yes. I have a question... In my first post...
  22. Thread: Random variant.

    by Lukas
    Replies
    64
    Views
    3,876

    Re: Random variant.

    public static void main(String[] args) {
    int min = 0;
    int max = 3;

    for(int i1 = 0; i1 < max; i1++){
    setI2((int) (Math.random() * (max+min)));

    System.out.println(i2);
    }
    }
  23. Thread: Random variant.

    by Lukas
    Replies
    64
    Views
    3,876

    Re: Random variant.

    Yes. Always is different numbers. I mean:
    First time:
    2
    1
    4
    9
    ...
    Second time:
    6
    8
  24. Thread: Random variant.

    by Lukas
    Replies
    64
    Views
    3,876

    Re: Random variant.

    Look.

    package Random;

    public class Random {

    private static int i;

    /**
    * @param args
  25. Thread: Random variant.

    by Lukas
    Replies
    64
    Views
    3,876

    Re: Random variant.

    Yes.
Results 1 to 25 of 32
Page 1 of 2 1 2