User Profile

Collapse

Profile Sidebar

Collapse
hirak1984
hirak1984
Last Activity: Nov 15 '08, 11:42 AM
Joined: Jan 2 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • hirak1984
    replied to Can't do str.split("|") ?
    in Java
    actually this works:
    Code:
    Str.split("\\|");
    See more | Go to post

    Leave a comment:


  • hirak1984
    replied to Can't do str.split("|") ?
    in Java
    If the trailing fields are optional, you need to write:
    [CODE=Java]line.split("\\| ",-1);[/CODE]

    demo:
    [CODE=Java]import java.util.Array s;

    public class Splitsville {
    public static void main(String[] args) {
    String[] data = {
    "a|b|c|d|e" ,
    "||||",
    "||c||"
    };
    ...
    See more | Go to post
    Last edited by BigDaddyLH; Feb 18 '08, 03:48 PM. Reason: woops! editting post by mistake, but then it was bad advice anyway ;-)

    Leave a comment:


  • hirak1984
    replied to Really simple comparision
    in Java
    well I tried something like the following:
    Code:
    		String one = "abc";
    		String two = "abc";
    		System.out.println(one==two);
    		System.out.println(one.equals(two));
    		System.out.println(one=="abc");
    		System.out.println(one.equals("abc"));
    		System.out.println(two=="abc");
    		System.out.println(two.equals("abc"));
    ...
    See more | Go to post

    Leave a comment:


  • hirak1984
    replied to Really simple comparision
    in Java
    but in that case, you have to override the equals method of the Object class for creating a meaningful comparison.

    If you use the default ".equals" method of the Object, you are geting the same "==" comparison only....
    See more | Go to post

    Leave a comment:


  • hirak1984
    replied to Code requested: Breadth-first Search
    in Java
    well you will get lots of such codes FREE if you search google.
    here we usually charge $500 for delivering codes.
    you have to PM any of the admins to get the address where you will have to send the check.

    best of luck....
    See more | Go to post

    Leave a comment:


  • hirak1984
    replied to Help with Program!
    in Java
    well precisely yes.
    i m sorry 4 the mistake...
    See more | Go to post

    Leave a comment:


  • hirak1984
    replied to calculating the age from current date
    in Java
    wow!!!
    that was gr8 man. really interesting.
    thnx JosAH...
    See more | Go to post

    Leave a comment:


  • hirak1984
    replied to invoking a servlet from an url
    in Java
    Try this. It should help you.

    Code:
    	<servlet>
    		<description>
    		MyServlet</description>
    		<display-name>
    		MyServlet</display-name>
    		<servlet-name>MyServlet</servlet-name>
    		<servlet-class>
    		packagename.MyServlet</servlet-class>
    	</servlet>
    	
    	<servlet-mapping>
    		<servlet-name>MyServlet</servlet-name>
    ...
    See more | Go to post

    Leave a comment:


  • hirak1984
    replied to Where should function reside?
    in Java
    Normally the set data members of class piston should reside in class piston.
    and u will call the set...() of the piston class from your main to set the values.
    hope that is clear.
    god bless...
    See more | Go to post

    Leave a comment:


  • hirak1984
    replied to calculating the age from current date
    in Java
    Look.
    first of all dont randomly pick up codes from the net. The code you posted is written by a professional, abiding by all the standards of code writing.
    But not so affluent as you are, it is bound to look puzzling to you.
    You need not take any user input at this point. Hard code a date in your main().
    and try to calculated age using it.
    use the formula they have used in the above part of your code.
    tell...
    See more | Go to post

    Leave a comment:


  • hirak1984
    replied to calculating the age from current date
    in Java
    so what is the problem?
    are you finding it difficult to calculate? or to write the code?
    first learn the calculation.
    tell us how would you calculate if the question was there in your mathematics class? post the formula....
    See more | Go to post

    Leave a comment:


  • hirak1984
    replied to Need help in Nested Loops...
    in Java
    so did you try yourself?
    please post the code that you have written.
    we will correct it, and add something if needed....
    See more | Go to post

    Leave a comment:


  • hirak1984
    replied to sample scripts of java
    in Java
    sorry but we are not vendors.
    we dont send across codes.
    if you have tried anything, please post it.
    we will be more than happy to help you.
    god bless...
    See more | Go to post

    Leave a comment:


  • hirak1984
    replied to Help with Program!
    in Java
    Code:
    System.class.println ("Time Duration of :" + Xsec);
    this should be

    Code:
    System.class.println ("Time Duration of :" + Xsec);
    See more | Go to post

    Leave a comment:


  • hirak1984
    replied to .xls file reading
    in Java
    there is an excellent library for making life easier for you.
    Google for Apache POI.
    best of luck...
    See more | Go to post

    Leave a comment:


  • hirak1984
    replied to Where should function reside?
    in Java
    according to my understanding of your problem,
    neither should the business logic stay in the "main", nor in the classes (A,B,C whatever).
    it should stay in some private method, which the main will call to execute the job.
    but please post details of your application, for better understanding....
    See more | Go to post

    Leave a comment:


  • hirak1984
    replied to invoking a servlet from an url
    in Java
    first learn what is "servlet mapping" with respect to Web.xml.
    u have to give the mapping name in the url....
    See more | Go to post

    Leave a comment:


  • hirak1984
    replied to POST in HTML
    it is basically the browser headache.
    u need not bother.
    else u have to write your own browser.
    U can surf the open source browser communities in the web.Like firefox....
    See more | Go to post

    Leave a comment:


  • hirak1984
    replied to project
    But be careful, dreamweaver adds some extra codes, that create much problem while debugging....
    See more | Go to post

    Leave a comment:


  • hirak1984
    replied to file ext
    you can use the "split" method of javascript.
    it has syntax same as the "String".split( "String") in Java.
    Google for it...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...