google.com, pub-4617457846989927, DIRECT, f08c47fec0942fa0 Learn to enjoy every minute of your life.Only I can change my life.

Sunday, February 10, 2019

Java program for hash table


import  java.util.*;
import java.lang.*;
import java.io.*;
class   hashtable
{
        static Hashtable<String,Double> stud=new Hashtable<String,Double>();
              public  static void main(String args[])
        {
                BufferedReader br=new BufferedReader(new InputStreamReader(System.in));               
                do                {
                        System.out.println("****************MENU*****************");
                        System.out.println("1:ACCEPT RECORD\n2:DISPLAY ALL                      RECORDS\n3:FIND HIGHEST\n4:EXIT");
                        System.out.println("\nEnter your choice:");
                        int ch=0;
                        try
                        {
                                ch=Integer.parseInt(br.readLine());
                        }
                        catch(IOException e)
                        {
                                System.out.println(e);
                        }
                        switch(ch)
                        {
                                case 1:
                                        accept();
                                        break;
                                case 2:
                                        displayall();
                                        break;
                                case 3:
                                        fhigh();
                                        break;
                             




                                    case 4:
                                        System.exit(0);
                                default:
                                        System.out.println("You entered wrong choice! TRY AGAIN!!");
                                        break;
                         }
               }while(true);
      }
               public static void accept()
               {
                        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
                        String name="";
                        Double d=0.0;
                        System.out.println("Enter the name:");
                        try
                        {
                                name=br.readLine();
                                System.out.println("Enter the percentage:");
                                d=Double.parseDouble(br.readLine());
                        }
                        catch(IOException e)
                        {
                                System.out.println(e);
                        }

                        stud.put(name,d);
                }
                public static void displayall()
                {
                        Enumeration keys=stud.keys();
                        while(keys.hasMoreElements())
                        {
                                String key=(String)keys.nextElement();
                                System.out.println(key+"="+stud.get(key));
                        }
                }
                public static void fhigh()
                {
                      






                         Double max=0.0;
                        Enumeration keys=stud.keys();
                        while(keys.hasMoreElements())
                        {
                                String key=(String)keys.nextElement();
                                if(max<stud.get(key))
                                        max=stud.get(key);
                        }      
                        System.out.println("Highest Marks="+max);
                }
        
}
                       

*****************************************************************
OUTPUT
******************************************************************



Enter your choice:
1
Enter the name:
vijay
Enter the percentage:
71
****************MENU*****************
1:ACCEPT RECORD
2:DISPLAY ALL RECORDS
3:FIND HIGHEST
4:EXIT

Enter your choice:
1
Enter the name:
ajay
Enter the percentage:
77
****************MENU*****************
1:ACCEPT RECORD
2:DISPLAY ALL RECORDS
3:FIND HIGHEST
4:EXIT

Enter your choice:
1
Enter the name:
 atul
Enter the percentage:
81
****************MENU*****************
1:ACCEPT RECORD
2:DISPLAY ALL RECORDS
3:FIND HIGHEST
4:EXIT

Monday, February 4, 2019

Habits of all Successful People


Habits of all Successful People:


1. They Set GOALS.
2. They Take Responsibility For Their Life.
3. They Have Great Self Discipline
4. They Are Obsessed With Self Development
5. They Read. A LOT!
6. They Manage Their Time Well
7. They Take Risks!
8. They Keep Going When They Suffer Failure & Setbacks
9. They Find A Way To Win
10. They Do What They Love


"When you sweat  a lot in time of peace you bleed less in times of war."


Ten skills which are hard to Learn, but which will make you successful
1. Speaking up (Public Speaking)
2. Being honest with yourself
3. Having confidence
4. Listening
5. Managing your time
6. Stop whining
7. Staying present in the moment
8. Being consistent
9. Getting enough sleep
10. Having empathy 

अच्छे विचार करे विचार

  पहचान की नुमाईश, जरा कम करें... जहाँ भी "मैं" लिखा है, उसे "हम" करें... हमारी "इच्छाओं" से ज़्यादा "सुन...