logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From satyanarayana <gsswamy....@gmail.com>
Subject Re: Double log4j.jar file causing
Date Thu, 16 Nov 2006 04:49:24 GMT
Borg <jadt <at> morebv.com> writes:
 
> Abhay,
> Did you ever find a resolution to this problem. I am having the same issue.
> 
> --Thanks
> 

  1. Read a properties file containing list of usernames and passwords as 
key=value
format. Accept a username from stdin and print the corresponding password.
Pick the properties file from classpath. Look at Class.getResourceAsStream()
API

2. Write a Java class to satisfy following conditions

   Class Key {
      private int i;
      private String s;

      public Key(int i, String s) {
         this.i = i;
         this.s = s;
      }

      // Your other code
   }

   Above class should satisfy following code
   HashTable ht = new HashTable();

   ht.put(new Key(10, "I am 10"), "Value Of 10");
   // Statement below should print "I am 10"
   System.out.println(ht.get(new Key(10, "I am 10"));

3. Ask the user to enter the path of a zip file and unzip that file at a
location given by user. Refer java.util.jar package

4. Write a function to print the given amount in words. Assume a maximum
value of 9999 for the parameter.
   Example 1: printInWords(257) should print following line
      Two Hundred and Fifty Seven

   Example 2: printInWords(1001) should print following line
      One thousand and one

   Example 3: printInWords(1291) should print following line
      One thousand two handred and ninty one

5. Read a file and sort the lines of that file using following criteria
   a. String comparision
   b. Length of line
   c. Second word of the line
   Accept search criteria as command line argument of your main method
   Use ArrayList to store the lines and use comparator






---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message