How does a person write a Java code? What does a Java code look like?
446782
You can write a JAVA code in any simple editor like Notepad...\nSave it as "ClassName.java"\n\ne.g. HelloWorld.java\n\nclass HelloWorld\n{\n    public static void main(String args[])\n   {\n       System.out.println("Hello World");\n   }\n}\n\nCompilation: javac HelloWorld.java\nRun: java HelloWorld\n\nRegarding Drawing in JAVA... you need to use techniques like AWT or SWING...\n\nMore info on AWT: http://en.wikipedia.org/wiki/Abstract_Windowing_Toolkit\n\nMore info on Swing:\nhttp://en.wikipedia.org/wiki/Swing_%28Java%29\nYou can learn more once you progress learning with the language...
107183
I think this is best answered by an example (I don't know how to keep formatting in Yahoo! Answers, so the formatting of the code is lost)\n\nfile TestFile.java\n===================\n\nimport java.io.*;\n\npublic class TestFile {\n\n   public static void main(String[] args) {\n      String inFilename = args[0];\n      String outFilename = args[1];\n      try {\n         BufferedReader in = \n            new BufferedReader(new FileReader(inFilename));\n         FileWriter out = new FileWriter(outFilename);\n         \n         String line = in.readLine();\n         while(line != null) {\n            out.write(line + "&#92;n");\n            line = in.readLine();\n         }\n         \n         out.close();\n         in.close();\n      } \n      catch(IOException ioe) {\n         ioe.printStackTrace();\n      }\n   }\n}\n\nThis simply takes two String arguments.  The first is used as a source file, the second is used as a destination file.  Everthing in the source file is copied into the destination file.  Anything that existed in the destination file is overwritten.\n\nThe Buffered reader makes it really easy to read from text files.  As you can see opening a file is as easy as creating a new instance of a FileReader or FileWriter.  Take a look at the Javadocs for these classes for more information.\n\nSince Java is a cross-platform language, you should add extra code for handling a file regardless of the operating system, but this should get you started.
1095749
WoW!!!! You will be some programmer!!!\n\nTry http://sourceforge.net/ or http://freshmeat.net/ and find it yourself.
253284
#include <stdio.h>\n\nint main(void) {\n\nint i, j, count; //C Sucks, wait till you take java\n\nfor(i=1; i<=1000; i++){&#92;&#92;goes through all numbers 1 to 1000\n    count=0;\n    for(j=2; j<i; j++)&#92;&#92;goes through all numbers 2 to i\n    {\n     if(i%j==0)&#92;&#92;checks to see if it i is evenly div. by i\n        count++;\n    }//nested for\n    if (count ==0)\n        printf("%d&#92;n", i);\n}//for\n\nreturn 0;\n}//main\n\n\n//Hope that helps!
1151965
Go to http://java.sun.com and you can learn all about it. Its the JAVA information superhighway.\n\nAlso check out http://www.java.com
255694
go to the website below for JAVA codes\nhttp://javasrcipt.internet.com\nfor help about html go here\nhttp://www.w3schools.com/html/
205661
JAVA\n\n- Java is an object-oriented programming language developed by James Gosling and colleagues at Sun Microsystems in the early 1990s.\n- Java is compiled and interpreted\n- Java is strongly typed\n- Java can be used to created standalone apps\n\n\nJAVASCRIPT\n\n- JavaScript is the name of Netscape's implementation of ECMAScript, a scripting programming language based on the concept of prototypes. The language is best known for its use in websites, but is also used to enable scripting access to objects embedded in other applications.\n- JavaScript is interpreted\n- JavaScript is loosely-typed\n- JavaScript can run only inside a browser. It cannot be used to create a standalone app.
287578
Firstly there's only one java language, which is written with several interfaces, but the java compiler is the same. \nThe syntax in Java is pretty much the same as in C++. The only thing is that Java is fully object oriented while C++ is only partially. Which means that if you write Java code, you have to declare classes, while C++ can run C codes which aren't object orinted, so you can write programs without classes. For VB tutorials try: \nhttp://www.programmingtutorials.com/vbnet.aspx
256299
Java programming has couple of pluses....\n+ it is Object oriented\n+ it is platform independent \n+ it is part of open source community development\n+ it is write once , run anywhere kind of programming\n\nyou will write a source *.java file compile with the JDK, \nthat will produce a bytecoded classfile\nthese byte coded class file run on different machines JVM without any modifications to suit environment.\n\n\n\njavac *.java  and run using \njava  file(class)\n\n\n\nFor a start you need couple of things..\nGet a Headfirst series Java book \nget the JDK  (java development kit) here\nhttp://java.sun.com/j2se/1.5.0/download-netbeans-50.html
423398
here...I'll tell you what to write and you write it...\n\n/* outline the program */\n\n// void main()...etc..\n\n/* define your variables */\n/* you'll need a pair of char pointers */\n/* and some numbers to hold converted values */\n\n\n/* input the first binary as a string */\n\n/* input the second binary as a string */\n\n/* convert them to decimal */\n\n/* add them */\n\n/* fprintf them */\n\n/* end program */\n\n\nthat's all.\nI write all my programs in commented logic first then fill in the blanks so that it does what I meant.  When I'm done, the program follows the flow and is already commented for the next person to follow.
280310
The code is usually divided into 2parts : client side and server side. If you use the view source option what you'll get to see is the client side scripts and some of that is also generated by the server side scripts. To get the server side scripts you'll have to ask the developers for it.\n\nHope this answers your question
18453
I think you should click on this link http://java.sun.com/docs/books/tutorial/java/concepts
933539
What do you mean by java class?
66876
Here's a pretty good one I wrote:\n\nhttp://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=58476&lngWId=1\n\nYou'll need Visual Basic to compile it or you can e-mail me and I'll send it to you...
156330
u can find them\nhttp://java.sun.com/docs/books/tutorial/index.html\ndownload the .zip files available\ni had downloaded and they are very encouraging for the programmers.
987285
It's called ASCII code... but can be written into art, instead of programmes.\n\nlike a rabbit...\n\n(&#92;__/)\n(+'.'+)\n(")_(")
161388
The idea is to equate a "programming object" to a "real world object."  Using a very simple and probably useless example (don't know how to indent here, code looks a little screwy):\n\nclass apple :\n  color = 'red'\n  def get_color(self) :\n    return self.color\n\nSo you could create an apple object & get its color:\n\na = apple()\nprint a.get_color()\n\nSlightly more useful might be a Person object for an address book, for instance:\n\nclass Person :\n  def get_address(self):\n     ...\n  def get_phone_number(self):\n     ...\n  def get_name(self) :\n     ...\n  def get_age(self) :\n     ...\n\n#blah blah blah\n\nSo, Object Oriented programming is mostly just a way to organize your program so classes (i.e. objects) resemble real objects.  This is very handy for keeping code maintainable.\n\nThere are more advanced Object oriented concepts, such as polymorphism and inheritance, but it's easier you to google them than for me write out examples :)