Search:

Type: Posts; User: andreaita44

Page 1 of 2 1 2

Search: Search took 0.07 seconds.

  1. Replies
    3
    Views
    863

    Re: Returning node

    return node.val;
  2. Re: Can someone explain why my loop does not run again even when "y" is entered.

    public static void main (String[]args) {
    String a = "y";
    while (a.equalsIgnoreCase("y")) {
    Scanner stdin = new Scanner(System.in);
    System.out.print("Enter...
  3. Thread: output?

    by andreaita44
    Replies
    2
    Views
    758

    Re: output?

    nothing
  4. Replies
    1
    Views
    621

    Re: what whould be the output

    nothing
  5. Re: Generating random 3 digit kength number with specific numbers. Need help!

    public static String RandomString(int[] digits, int length) {
    Random r = new Random();
    String str = "";
    for(int i = 0; i < length; i++) {
    int n = (int)...
  6. Re: How do I calculate power using for loop?

    int ans2 = n2^x2;
    if you want to use for loop:


    public static double power(int base, int exponent) {
    double b = base;
    if(exponent <= 1) {
    for(int e = exponent;...
  7. Replies
    2
    Views
    974

    Re: Nested For Loop Problem

    package me.andreaita44;

    import java.util.Scanner;

    /**
    *
    * @author andrea.campostrini
    */
    public class Test {
  8. Re: Finding a String value in the ArrayList

    public int searchRow1(Person name) {
    if(row1.size() > 0) {
    for (int i = 0; i < row1.size(); i++) {
    if (row1.get(i).getName().equals(name.getName())) {
    ...
  9. Re: toString on ArrayList is not working :(

    package tournament;

    import java.util.ArrayList;

    public class Team {

    private String name;
    private ArrayList<Player> players;

    public Team(String name) {
  10. [SOLVED] Re: How do I add an index in the middle of an ArrayList?

    row1.add((int)Math.ceil(row1.size()/2.0), (name));
  11. Re: Help the code seems fine and all but it doesn't identify the names even it's right

    import java.util.Scanner;

    public class Employee {

    public static void main(String[] args) {

    /*-----------------------------------------------------------*/
    ...
  12. Replies
    1
    Views
    523

    Re: please help

    source?
  13. Replies
    2
    Views
    830

    Re: help with codoe

    try {
    /*--------------------------------------------------------------*/
    Scanner input = new Scanner(System.in);
    Scanner reader = new Scanner(new File("path"));...
  14. Replies
    2
    Views
    596

    [SOLVED] Re: What am I missing here?

    you need to increment variable MaxInRow1


    int MaxInRow1 = 0;
    if (name.hasVIPpass() == true) {

    if (MaxInRow1 < 10)
    {
    row1.add(name);
    ...
  15. Re: I have to send this tomorrow again and i don't have any idea what's wrong

    final int a=5;
    final int b=3;

    int[][] Table= new int[a][b];

    Table[0][0]=182;
    Table[0][1]=41;
    Table[0][2]=202;

    Table[1][0]=145;
  16. Re: I have to send this tomorrow again and i don't have any idea what's wrong

    from both for you have to remove it
  17. Re: I have to send this tomorrow again and i don't have any idea what's wrong

    remove = in the for
  18. [SOLVED] Re: How to make a team with min. 2 max 5 players with Objects and Arraylist?

    can you send me the complete tournament class?
    what does readUserInput do?
  19. Replies
    1
    Views
    568

    Re: Are arraylists redundant?

    Arrays are static elements which means that once defined the space cannot be changed. Instead the arraylists are dynamic that is the space can vary. For example if you have an arraylist in which you...
  20. Re: Why System.in returns -1 when I pressed "Enter key" how can I mimic "Enter key" in console?

    InputStream in = System.in;
    int read = in.read();
    System.out.println(".");
    System.out.println((char)read);
  21. [SOLVED] Re: How to make a team with min. 2 max 5 players with Objects and Arraylist?

    public static void main (String []args){
    ArrayList<Team> teams = new ArrayList<>();
    Player[] PlayersA = new Player[3];
    PlayersA[0] = new Player("Kim");
    PlayersA[1]...
  22. Re: Project about Chat application with multi hop forwarding

    can i see you source code?
  23. [SOLVED] Re: How to make a team with min. 2 max 5 players with Objects and Arraylist?

    create a method that returns a String-> foreach element in the array add to a temp variable the name of the player -> return the temp variable
  24. [SOLVED] Re: How to make a team with min. 2 max 5 players with Objects and Arraylist?

    instead of the arraylist I would use an array of maximum size 5, then I would create a variable that indicates how many players there are in the array. Then I would create add and remove methods.
  25. Re: Hi guys my code here is showing errors specifically cannot find symbol even though i have declared this

    you need to define class Item
Results 1 to 25 of 36
Page 1 of 2 1 2