Search:

Type: Posts; User: exose

Search: Search took 0.52 seconds.

  1. Replies
    3
    Views
    5,133

    Re: filling an array with strings

    Student class


    import java.io.*;
    import java.util.*;

    public class Student
    {
    private String firstName;
    private String lastName;
  2. Replies
    3
    Views
    5,133

    filling an array with strings

    Hi,

    I am trying to fill an array with strings but the code does not work:


    static int numStudents = 20;
    Student[] students = new Student[numStudents];
    String theFiller = "0";
    ...
  3. Re: how to implement method to add new Student and display it

    :)

    It is working! :) thanks so much! I have even changed some stuff for example:


    public void displayStudentDetails()
    {
    for (int i=0; i<length; i++)
    {...
  4. Re: how to implement method to add new Student and display it

    ok thanks,

    I have changed the addStudent method to:


    public void addStudent()
    {
    students[length].getFirstName();
    students[length].getLastName();
    ...
  5. Re: how to implement method to add new Student and display it

    well... I am trying to figure out how to increase number of students and add another student to the array, for example:

    When I will choose "Add Student" from Menu, I should be able to add a...
  6. how to implement method to add new Student and display it

    hi,

    I am at the beginning of my assignment and I have some problems, here is my code:


    import java.io.*;
    import java.util.*;

    public class StudentDatabase
    {
  7. Replies
    7
    Views
    6,069

    Re: user name and password validation

    ah ok, corrected:


    for (int i = 0; i < userName.length; i++)
    {
    if(userName[i].equals(userNameInput) || password[i].equals(passwordInput))
    {
    ...
  8. Replies
    7
    Views
    6,069

    Re: user name and password validation

    thanks for your input, i have corrected few things and now my code looks like:


    public class UserValidation

    {
    private Scanner scan;
    public String userNameInput;
    public String...
  9. Replies
    7
    Views
    6,069

    user name and password validation

    Hi,

    I have created Guessing Game where computer is generating random number from 1-100 and then user needs to guess it.

    as the second part of the assignment I need to:

    1. Restructure the...
Results 1 to 9 of 9