User Profile

Collapse

Profile Sidebar

Collapse
Andrew Hopps
Andrew Hopps
Last Activity: Mar 22 '12, 11:39 AM
Joined: Mar 22 '12
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Andrew Hopps
    replied to Simple User/Pass Access
    in Java
    Just for the sake of argument and to stay within my limits, this program is to be used by only me and only on my computer, and therefore I would have the only password. Would the above work?
    See more | Go to post

    Leave a comment:


  • Andrew Hopps
    started a topic Simple User/Pass Access
    in Java

    Simple User/Pass Access

    Code:
    import java.util.Scanner;
    
    public class Test {
    	public static void main(String[] args) {
    		Scanner input = new Scanner(System.in);
    		String username, tempuser;
    		username = "testuser";
    		
    		{System.out.println("Please enter your username.");
    		tempuser = input.nextLine();
    		if (!tempuser.equals(username)){
    			System.out.println("Wrong username.");
    ...
    See more | Go to post
    Last edited by Andrew Hopps; Mar 22 '12, 09:46 AM. Reason: Added Code and Link
No activity results to display
Show More
Working...