Skip to main content

Featured

Game Development Tutorials In Android

Game Development Tutorials In Android Hi Guys,                 We are shortly started Game Development Tutorials in Android Studio. So everyone supports me and share this blogs to your friends. Guys, At this time everyone is freely available to source code and we are provide a video for step by step game developments. you are learn free and feel free to support us. Guys, if you have any question to me, so feel free to comment us. I will try to answer all the question as long as possible.                                                     Thank's                                                                          ...

Properties Test In Java Collection Program

Properties Test In Java Collection Program

In this Example, we will discuss an important chapter of Java, Properties test but Before we can start to make the Properties Test Program, click on the Advertisements , available on this page.


import java.util.*;
class Propertiestest
{
     public static void main(String args[])
    {
           Properties defList = new Properties();
           defList.put("Florida", "Tallahassee");
           defList.put("Wisconsin", "Madison");
           Properties capitals = new Properties(defList);
           Set states;
           String str;
           capitals.put("Illinois", "Springfield");
           capitals.put("Missouri", "Jefferson City");
           capitals.put("Washington", "Olympia");
           capitals.put("California", "Sacramento");
           capitals.put("Indiana", "Indianapolis");

           states = capitals.keySet();
           Iterator itr = states.iterator();
           while(itr.hasNext()) {
                 str = (String) itr.next();
                 System.out.println("The capital of " +str + " is "+capitals.getProperty(str)+ ".");
           }
          System.out.println();
         // Florida will now be found in the default list.
         str = capitals.getProperty("Florida");
         System.out.println("The capital of Florida is "+ str + ".");
   }
}


Compile And Run On This Program for Better Understanding....

If this information is important to you , and you want to , I will continue writing some more details of Java, Android Programming Language, so click on the advertising, available on this page. This is motivate me for writing some more useful stuff, Thank's 

Comments