Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: application in java

  1. #1
    Junior Member
    Join Date
    Apr 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default application in java

    how to create an java application which can store several user name and passwords of a user in the system of different applications such as Facebook, twitter, gmail etc and when they are call they must appear on the screen. CAN any one please help me out,,,............

    import java.io.*;
    import java.util.scanner;
    class page
    {
    protected String username,password;
    username=mukunda;
    password=mukunda;
    }
    class login extends page
    {
    public static void main(String args[])
    {
    String user,pass;
    Scanner sc= new Scanner(System.in);
    System.out.println("username:");
    user=Sc.nextLine();
    System.out.println("password");
    pass=Sc.nextLine();

    if(user=username)
    {
    System.out.println("user name is correct");
    if(pass=password)
    {
    System.out.println("password is correct");
    System.out.println("login is successful");
    System.out.println("--------------------);
    System.out.println("enter your choice");
    System.out.println("1. Facebook");
    System.out.println("2. Orkut");
    System.out.println("3. Twitter");
    System.out.println("4. Gmail");
    int choice;
    choice=Sc.nextInt();
    switch(case)
    {
    case1:
    System.out.println("**FACEBOOK**);
    System.out.println("user name is mukunda");
    System.out.println("pass word is mukunda12345");
    break;
    case2:
    System.out.println("**ORKUT**);
    System.out.println("user name is muukunda");
    System.out.println("pass word is mukunda7");
    break;
    case3:
    System.out.println("**TWITTER**);
    System.out.println("user name is mukunda");
    System.out.println("pass word is mukunda6");
    break;
    case4:
    System.out.println("**GMAIL**);
    System.out.println("user name is mukunda");
    System.out.println("pass word is mukunda2");
    break;
    defualt:
    System.out.println("**invalid input**);
    break;
    }
    }
    else
    System.out.println("password is incorrect");
    }
    else
    System.out.println("incorrect user name");
    }
    }
    }

    CAN ANY ONE PLEASE CHECK THE ERRORS
    Last edited by mukunda; June 14th, 2013 at 02:56 AM. Reason: CAN ANY ONE PLEASE CHECK THE ERRORS


  2. #2
    Member
    Join Date
    May 2011
    Location
    west palm beach, FL
    Posts
    189
    My Mood
    Tired
    Thanks
    41
    Thanked 11 Times in 10 Posts

    Default Re: application in java

    ill get you started

    prog.java

    public class prog {
     
    	/**
    	 * @param args
    	 */
    	public static void main(String[] args) {
    		// TODO Auto-generated method stub
     
    	}
     
    }

    now show what you have tried and then ask a question

Similar Threads

  1. Replies: 0
    Last Post: April 5th, 2013, 10:20 AM
  2. Java program to Add a JMenu toolbar to a Java Swing application
    By JavaPF in forum Java Swing Tutorials
    Replies: 6
    Last Post: March 6th, 2012, 12:25 PM
  3. how to run any installed application through my java application??
    By sgsamanthjain in forum Java Theory & Questions
    Replies: 1
    Last Post: April 1st, 2011, 08:17 AM
  4. Replies: 1
    Last Post: January 12th, 2011, 05:55 AM
  5. Replies: 0
    Last Post: December 3rd, 2009, 04:43 PM