• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

a programing question of the JSON output

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
program name :para
if para compiler as java programe:
java para 100 arg2 null test
note: there are give four arguments,rquest is Uncertainty

the programe output as follow:

{

"all arguments":["100","arg2","null","test"],

"arg1": "100",

"arg2": "arg2",

"arg3": "null",

"arg4": "test"

}

para output required for the formal json format text.

Integrity of the code is feasible and necessary Notes!

please teach me how to write the java programe,thanks!

[ August 27, 2008: Message edited by: chen likun ]

[ August 27, 2008: Message edited by: Bear Bibeault ]
[edit]Disable Smilies. CR[/edit]
[ August 28, 2008: Message edited by: Campbell Ritchie ]
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Chen,
Is this a homework question? If so, nobody will do your assignment for you. They will give pointers, but not the code.

In general, it is good advice to start from the simple and work up until you get stuck. That way you can show what you have so far and that you are trying.

For example, can you write a Java program that outputs: {}?
How about "all arguments":["100","arg2","null","test"] ?
etc
 
Jeanne Boyarsky
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also, this sounds like a question about Java rather than JavaScript so I'll move it to our Java beginners forum.
 
Marshal
Posts: 79179
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to JavaRanch. You had a stray in your posting, which I got rid of by ticking the "disable smilies" button below and to the left of the posting.

How much Java do you know? Have you got a book? I like Deitel and Deitel (I think a second-hand copy of the 6th edition will do well for a beginner), and lots of people on the Ranch like Sierra & Bates (Head First Java)-make sure to get the 2nd edition. You can find lots of useful information in the Java Tutorials, too. In fact there are things in the Java Tutorials which don't seem to be in any book.
Please post what you have got, and people will be happy to look at it
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic