User Profile

Collapse

Profile Sidebar

Collapse
pjerald
pjerald
Joined: Oct 13 '07
Location: Velacheri in Chennai(INDIA)
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • pjerald
    replied to How to sort a property object wrt its values?
    in Java
    how to sort a property object wrt its values?

    i have done the code but with normal replacement sorting algorithm...

    Code:
    package util;
    
    import java.util.ArrayList;
    import java.util.HashSet;
    import java.util.Iterator;
    import java.util.Properties;
    import org.apache.commons.collections.CollectionUtils;
    
    public class Count
    {
        public static void main(String
    ...
    See more | Go to post

    Leave a comment:


  • pjerald
    started a topic How to sort a property object wrt its values?
    in Java

    How to sort a property object wrt its values?

    Hello,

    I have a bit of code that prints the counts of objects in a list. i want to sort it by its count.

    code :
    Code:
    package util;
    
    import java.util.ArrayList;
    import java.util.HashSet;
    import java.util.Iterator;
    import org.apache.commons.collections.CollectionUtils;
    
    public class Count
    {
        public static void main(String args[]) throws Exception
    ...
    See more | Go to post

  • i dont know, how do you say it is base 64 encoded? let us know if you have some trick to find the type of encoding?
    See more | Go to post

    Leave a comment:


  • pjerald
    replied to ArrayList issue
    in Java
    Code:
    private void setStatus(String newStatus){
           this.status = newStatus;
           /*
           if (status.equals(OPEN))
               {
               this.status = OPEN;
               }
           if (status.equals(SUSPENDED))
               {
               this.status = SUSPENDED;
               }
           if (status.equals(CLOSED))
               {
               this.status = CLOSED;
    ...
    See more | Go to post

    Leave a comment:


  • pjerald
    replied to Java Serializable
    in Java
    "serializab le" is a machanism used to pass an object to a remote server.

    Consider a Hashtable or Hashmap object which has some keys and values in a java program. And you need to send this object(Note: See you need the whole object) to a remote server, how you do this?

    Remember you cannot pass hashtable object as a parameter(Try this) via http request or response.

    When you do integration with some...
    See more | Go to post

    Leave a comment:


  • pjerald
    replied to JSP Href
    in Java
    Just pass a parameter.
    What i am understand is, you have more links to a same jsp page and you need to know by which link this page is rendered right? Then just pass parameter like href="/myjsp.jsp?link= 1",href="/myjsp.jsp?link= 2" something like this.
    See more | Go to post

    Leave a comment:


  • pjerald
    replied to java.lang.NoClassDefFoundError
    in Java
    check the CLASSPATH variable. you can find it easily by ,


    use this for windows -
    echo %CLASSPATH%
    use this for linux -
    echo $CLASSPATH
    See more | Go to post

    Leave a comment:


  • pjerald
    replied to Compare two lists contaning different objects
    in Java
    Thank you josAH.

    I have done the code. Used constructors to make my objects(records from list)

    works well. Thanks a lot for your replies.

    regards
    jerald
    See more | Go to post

    Leave a comment:


  • pjerald
    replied to Compare two lists contaning different objects
    in Java
    Thanks for the reply.

    My understanding is this ...

    1) Make objects(Say person) from each and every record.
    2) Person class should implement equals and hashcode methods...
    3) Then easily compare each and every (Person objects) records for equality.

    is am i wright ?

    Thanks and Regards
    Jerald.
    See more | Go to post

    Leave a comment:


  • pjerald
    replied to Compare two lists contaning different objects
    in Java
    So here is my entire code.....


    I am comparing two csv files taking care of their data types..


    Code:
    package test;
    
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.IOException;
    import java.math.BigDecimal;
    import java.util.ArrayList;
    import java.util.List;
    import com.csvreader.CsvReader;
    import java.io.BufferedReader;
    ...
    See more | Go to post

    Leave a comment:


  • pjerald
    replied to Compare two lists contaning different objects
    in Java
    Dear josAH,

    Here is my code,


    Code:
    package test;
    
    import java.math.BigDecimal;
    import java.util.ArrayList;
    import java.util.List;
    
    public class ExpenseComparator {
        public static void main(String[] args) throws Exception
        {
            List<Object> expected = new ArrayList();
            List<Object> received = new ArrayList();
    ...
    See more | Go to post

    Leave a comment:


  • pjerald
    replied to Compare two lists contaning different objects
    in Java
    Thank you JosAH,

    I am trying to do this. I have written some code. I will reply when i am finished.

    Regards
    jerald
    See more | Go to post

    Leave a comment:


  • pjerald
    started a topic Compare two lists contaning different objects
    in Java

    Compare two lists contaning different objects

    Dear all,

    I have a list object, which contains list objects. This list objects contains objects of different type like String, long, BigDecimal and so on..

    for eg.,
    if we print it in console it will be like this,

    list object is :
    [
    [jerald,26,"#32 chennai", 43.0098],
    [Roses,25,"#06 kanya kumari", 13.00108]
    ]

    this example object has two records...
    See more | Go to post

  • pjerald
    replied to Run commands using java
    in Java
    Thanks for the reply.



    Sorry for code indentation.

    I read API documentation and understand that my constructor is equivalent to

    Thread(null, null, name);
    which is Thread(ThreadGr oup group, Runnable target, String name)

    I don know how to proceed with this. give an idea please.
    i will try and get back to you....
    See more | Go to post

    Leave a comment:


  • pjerald
    started a topic Run commands using java
    in Java

    Run commands using java

    Dear All

    I have written a simple program using thread. My aim is to run a command. Please lead me how to do ? I am just posting my start code here.

    [code=java]

    package com.pjerald.rob ot;

    import java.net.*;
    import java.io.*;

    public class RunCmd extends Thread
    {
    public static void main(String[] args)
    {
    //RunCmd rc = new RunCmd("ls -ltr");...
    See more | Go to post
    Last edited by Ganon11; Aug 30 '08, 01:08 AM. Reason: Fixing [CODE] tags.

  • pjerald
    replied to protected access in Object class
    in Java
    Sorry for the delayed replay. Jos I cannot understand any D can call m() on any B and D. Can you please explain that.

    My understanding is this
    [code=java]
    class F{
    class B { protected void m() { ... } }
    class D extends B { ... }
    class E extends B { ... }
    class Derived extends D { ... }
    ...

    C c = new C();
    c.m();
    // c invokes m. and the m is not defined inside...
    See more | Go to post

    Leave a comment:


  • pjerald
    started a topic protected access in Object class
    in Java

    protected access in Object class

    Clear me friends.

    Object class is the base class for all classes. Thus the methods with protected access in the object class can be invoked by any object(Of any class).

    I know the statement is wrong!.

    But i cannot convince myself(Since i don't know it clearly).

    Shed some light.

    Thanks
    Jerlad
    See more | Go to post

  • pjerald
    started a topic Suggest me some "small" projects in java..
    in Java

    Suggest me some "small" projects in java..

    I am just a beginner in java. suggest me some small projects in java. I am just now tried and succeeded to get a connection to my mysql database. Can you please help me ?
    thanks and regards,
    p.jerald
    See more | Go to post

  • I am running my mysqld in 3306 port.. can i change it with any number ..

    I am running my mysqld in 3306 port.. can i change it with any number ..
    See more | Go to post

  • I have killed my kicker panel with xkill command.. I am a new bee to linux...

    I have killed my kicker panel with xkill command.. I am a new bee to linux... Please help me to recover...
    Thanks,
    P.Jerald
    See more | Go to post
No activity results to display
Show More
Working...