User Profile

Collapse

Profile Sidebar

Collapse
coder44
coder44
Last Activity: Apr 2 '10, 12:34 PM
Joined: Dec 6 '09
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • coder44
    started a topic returning Json to client?
    in Java

    returning Json to client?

    How can I return or send a JSonObject to a client from the Server handle function?
    The JsonObject the result of the some operations. But I didn't find a solution for returning this object

    It is a problem that it must be JsonObject... (On the other hand I use Jetty for http protocol)
    See more | Go to post

  • This code help u but my dear if you are new in java maybe you don't understand some sections, please ask me I try to explain you. Also you study hard and write more code examples about java...

    Good work.
    See more | Go to post

    Leave a comment:


  • Code:
    import java.io.BufferedReader;
    import java.io.FileReader;
    import java.io.IOException;
    import java.util.ArrayList;
    
    
    // main class
    public class Main {
    
    	// for saving word objects
    	private ArrayList<Word> words;
    		
    	public static void main(String[] args) throws IOException {
    		
    		Main main = new Main();
    		main.start();//start
    		
    	}
    ...
    See more | Go to post
    Last edited by Frinavale; Dec 8 '09, 04:35 PM. Reason: Please post code in [code] ... [/code] tags. Added code tags

    Leave a comment:


  • if you use split function you should also use parameters for parsing. In your example and, eat, cat words seperated with space and comma. You must give this arguments to split function. For example;

    char [] delims = {"," , " "};
    line.split(deli ms);
    See more | Go to post

    Leave a comment:


  • you can also use like that;
    Code:
    String line = rd.readLine();
    char [] words = line.split(" "); 
    system.out.println(words[0]);
    system.out.println(words[1]);
    See more | Go to post
    Last edited by Frinavale; Dec 8 '09, 04:34 PM. Reason: Please post code in [code] ... [/code] tags. Added code tags

    Leave a comment:


  • coder44
    replied to reached end of file while parsing
    in Java
    if(n > 100000 && n < 9999); --> here is a problem
    if(n > 100000 && n < 9999) ";" should not use semicolon after if
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...