Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Java HALLLP

Name: Anonymous 2011-11-04 16:00

can you lads assist me with how to change the commented values...this is my first day at Java

(and no its not for an assignment)

Thank you :D

=============

package Class;

public class UserClass{
public String UserID;
public String UserPasswd;


public String getUserID() {
return UserID;
}
public String getUserPasswd() {
return UserPasswd;
}
public void setUserID( String userID){
this.UserID = userID;
}
public void setUserPasswd(String userPasswd) {
this.UserPasswd = userPasswd;
}

public void handleUser(){

System.out.println(getUserID());
//change userID value
System.out.println(getUserID());

System.out.println(getUserPasswd());
//change userPasswd value
System.out.println(getUserPasswd());

}

}

Name: VIPPER 2011-11-04 16:01

The assignment is JEWS.

Name: Anonymous 2011-11-04 16:03

In advance the following code is testing purposes


System.out.println(getUserID()); //to view the orig value
//change userID value            //to change UserID in setUserID()
System.out.println(getUserID()); //to check value change

System.out.println(getUserPasswd());//to view the orig value
//change userPasswd value           //to change UserPasswd in setUserPasswd()
System.out.println(getUserPasswd());//to check value change

if i go

setUserID((System.in)); it tries to force this gay shit - - -

public void setUserID( InputStream in){
        this.UserID = in;
    }

Name: Anonymous 2011-11-04 16:04

seriously not for an assignment, my university semester has finished,

trying to make an application because i'm fucking lazy (not sure how that works)

Name: Anonymous 2011-11-04 17:49

bumping for answer

Name: VIPPER 2011-11-04 17:51

bumping for JEWS

Name: Anonymous 2011-11-04 17:54

real helpful vipper,

glad i'm no longer pounding the waste gash you crawled out of

Name: VIPPER 2011-11-04 17:55

>>7
My name is VIPPER.

Name: Anonymous 2011-11-04 17:56

point being?

Name: VIPPER 2011-11-04 18:01

JEWS

Name: Anonymous 2011-11-04 19:40

>>3

I assume u are trying to read values in from the keyboard? not just pass hard coded values right?

Name: Anonymous 2011-11-04 19:42

if so:

tring keyboardInput = "";

InputStreamReader converter = new InputStreamReader(System.in);
BufferedReader in = new BufferedReader(converter);
keyboardInput = in.readLine();
setUserID(keyboardInput);

Name: Anonymous 2011-11-04 19:42

>>12

tring should obviously be String*

Name: Anonymous 2011-11-04 19:44

public String UserID;
public String UserPasswd;

should be private as well, otherwise getters and setters are kind of pointless

Name: Anonymous 2011-11-04 20:13

If you are not typing in anything, just call the set method. If you are typing something, then just use scanner and assign it to a variable and put that variable as an argument to the set method.

Name: Anonymous 2011-11-05 10:54

>First day working at Java.

>Don't know Java

>Don't know how to code with Java

HURR

Don't change these.
Name: Email:
Entire Thread Thread List