Java tutorial

hi,
I'm studing computer science and i was looking for an opensource manual that described in detail all methods and classes of java.
Can someone help me?
Thanks in advance, bye!

What do you mean by in detail? What's wrong with the javadoc
Kaj

Similar Messages

  • Java tutorial - helps, problem  is i don't understand the API

    I don't understand the JAVA Tutorials or the API

    Take two steps back.
    Buy a book on basic Java Programming. You need to understand the concepts behind programming before you should start reading the API.
    But kudos for at least trying to read the API.
    Now look at the column on the left, and follow the link called [url http://developer.java.sun.com/developer/onlineTraining/] Tutorials 
    and then the link titled [url http://java.sun.com/docs/books/tutorial/index.html]The Java Tutorial (Java Series).
    And finally read through the sections starting with [url http://java.sun.com/docs/books/tutorial/getStarted/cupojava/index.html]Your First Cup of Java.
    Then once you have been through all of that, come back and ask for clarification
    on any specific points that you have trouble understanding.
    Finally (Because the Finally always gets executed) Try taking a class in java programming.
    regards

  • Where is the "Net" trail from Java tutorial?

    Hello!
    May be it's stupid question, but I just need to look at Net trail from java tutorial (java.net, urls, sokets etc...) . As I remember there was good tutorial about this, probably in "essential java classes", but now there is no it.
    Does anybody know where is it or what's happend?
    Thanks

    Is this what you're looking for? http://java.sun.com/docs/books/tutorial/networking/index.html

  • I'm stuck! Following the Java Tutorial

    I'm confused :=Q
    I am following the Java tutorial and am trying to do the ClickMe applet. The html file was saved as text in notepad. I downloaded the ClickMe and Spot source files. They compiled without errors along with the html file. I double checked my DIR and saw that I had the class files. When I went to run the applet, the little window appeared without any spot and said something about Clickme class in the heading border and then in the box it said applet not initialized. So, I went through the forum and looked for anything similar and I saw that someone said to compile like:C:\jdk1.3.1_01 javac ClickMe.java Spot.java
    So, I tried that, and I still have class files, but now I don't have the applet box showing anymore and I don't get any errors. I was successful when I did the Hello World applet, so I know it's not a class path problem or text prob. I was using typing appletviewer ClickMe.html
    I'm getting so hungup on trying to get the applets to work I am losing track of how and why they are supposed to work. It is so discouraging especially when there doesn't seem to be anyone in particular to ask.
    Does anyone have anything encouraging to offer?
    I am using JDK 1.3 on WinXP (Java has been totally enabled without using the plug in) It has worked successfully.
    Thanks in advance once again for your help.
    Karen

    I'm learning with the tutorial also ;)
    Makes about 3 months I'm doing so, and from my experience, it is much more fun to create Programs than Applets.. I always work with Swing and it is a pain to use it inside Applets (but Swing is really great to create GUIs..) Learning how to build Jar and how to use Swing helps you building up Jar files that run like EXEs ;) That gives good results!

  • Java tutorial suggestion

    Hi Guru
    I am newbie i wish to learn Java, to improve my stills and to find jobs in java related domain
    I need your help to get succeed please suggest your opinion
    1)Is that easy to learn Java by Self? I know little bit (Threotically) But technical wise i am not that much sound ..
    2)If i what to be good in techical means ?what should i want to do ..
    3)Is it bettet to go for training center . I have already Paid 18k For learning java in one instute but didnt gain the practical knowledge .they have not given me training as per the company prospects..so i am sound only theotical
    I can test my skill and i found that i am not that much good in programming
    4)I there any best place for training in Chennai (To teach my prcatically and as per the company aspects
    5)It ll be bets to learn by self purchasing Book like that and go for it since i know some logic but implementing that logic i am bad
    6)with out getting the details i have wasted my money once again iam not ready to waste money so i need your suggetsion
    So please suggent me the best way to start my carrier in Java
    It will be highly appreciable for your help
    Aarasu

    850225 wrote:
    I am newbie i wish to learn Java, to improve my stills and to find jobs in java related domainOkay. Generally you would do that "on the job" though. More on that later.
    >
    1)Is that easy to learn Java by Self? I know little bit (Threotically) But technical wise i am not that much sound ..The language is not that hard to learn. The platform and the architectural insight generally take years to develop, all through working experience.
    2)If i what to be good in techical means ?what should i want to do ..Start at the very beginning; learn the language and the tools. The online java tutorial could be enough.
    3)Is it bettet to go for training center . I have already Paid 18k For learning java in one instute but didnt gain the practical knowledge .they have not given me training as per the company prospects..so i am sound only theoticalNo, I wouldn't do that. It is better to learn by doing, and that you can do yourself. You cannot be told HOW to program, only where to look and what to focus on. The rest is up to you in any case. Generally you don't only read a book or listen to a lecture; you actually make something and through research, reasoning and some trial and error you gradually figure out how to do things. And after that you figure out what works well and what doesn't in specific situations.
    I can test my skill and i found that i am not that much good in programming
    4)I there any best place for training in Chennai (To teach my prcatically and as per the company aspectsA school? Most of us start out there, although I still stand by my earlier comment that it is mostly up to you to learn this stuff.
    5)It ll be bets to learn by self purchasing Book like that and go for it since i know some logic but implementing that logic i am badYeah that is a big issue. You cannot force yourself to understand these things, if you have big problems with logical reasoning and thinking then programming simply isn't for you.
    6)with out getting the details i have wasted my money once again iam not ready to waste money so i need your suggetsion
    So please suggent me the best way to start my carrier in Java Really, I would first ask yourself if a career in development really is for you. Perhaps you shouldn't focus on Java development but for example look at Ruby development. Maybe Java at this point is simply too big a step for you.

  • ElGamal - Is there some Java tutorial that shows how this can be done?

    Hello,
    I found this by doing a quick search on Google.com;
    http://www.java2s.com/Tutorial/Java/0490__Security/ElGamalexamplewithrandomkeygeneration.htm
    However I was wondering whether there is Java Tutorial that shows how ElGamal can be implemented in a Java program. I am looking to develop a client / server application that share files between them and I would like to encrypt every file being transmitted.
    Regards,
    Sim085

    Either use linked content or use InCopy Text stories.

  • The Java Tutorial

    Does The Java Programming Language, Third Edition include the contents of The Java Tutorial, Third Edition: A Short Course on the Basics ?

    Contact the Documentation Team

  • Problems with running quote server from Java Tutorial

    Hello
    The problem is this: I try to run QuoteServer from java tutorial (Trail: Deployment
    Lesson: Applets, A Simple Network Client Applet) and server compiles but when I try to run it following message shows up:
    QuoteServer listening on port: 32769
    Exception in thread "QuoteServer" java.lang.NullPointerException
    at java.net.DatagramPacket.setData(DatagramPacket.java:244)
    at java.net.DatagramPacket.<init>(DatagramPacket.java:62)
    at java.net.DatagramPacket.<init>(DatagramPacket.java:78)
    at QuoteServerThread.run(QuoteServerThread.java:38)
    And then server stops. What's going on?.
    Cheers

    Line 38 of QuoteServer.java is: packet = new DatagramPacket(buf, 256);
    And that's where the problem is because in line 31 is written byte[] buf = null;
    And what I get when I run QuoteServer.java with gcj version of java (gives more clues) is:
    java QuoteServer
    QuoteServer listening on port: 32785
    Exception in thread "QuoteServer" java.lang.NullPointerException: Null buffer
    at java.net.DatagramPacket.setData(byte[], int, int) (/usr/lib/libgcj.so.6.0.0)
    at java.net.DatagramPacket.DatagramPacket(byte[], int, int) (/usr/lib/libgcj.so.6.0.0)
    at java.net.DatagramPacket.DatagramPacket(byte[], int) (/usr/lib/libgcj.so.6.0.0)
    at QuoteServerThread.run() (Unknown Source)
    at .GC_start_routine (/usr/lib/libgcj.so.6.0.0)
    at .__clone (/lib/libc-2.3.5.so)
    So the problem is with this null buffer. What enter in line 31 instead of null?.
    What values can byte[] reach except null?. I tried to find byte[] in java API but there is only Byte variable. I get the same output with java 5.0 compiler (but less clues).
    Message was edited by:
    macmacmac

  • Is there any core java tutorial form sun site

    HI all,
    is there any core java tutorial form sun site where i can down load it study them on offline rather that seeing it on line.
    can any give me link for it.........
    vijay

    thank you for reply ,
    i have googled and find this help full in getting the details and u can download from here.
    "http://java.sun.com/docs/books/tutorial/information/download.html"
    vijay

  • Question about scope in the enum example in the Java Tutorial

    Hi,
    On page http://java.sun.com/docs/books/tutorial/java/javaOO/enum.html of the Java tutorial the enumeration MONDAY is not prefixed with the enum name when it is used in the function tellItLikeItIs.
    public class EnumTest {
         Day day;
         public EnumTest(Day day) {
              this.day = day;
         public void tellItLikeItIs() {
              switch (day) {
                   case MONDAY: System.out.println("Mondays are bad.");
                                  break;
                   case FRIDAY: System.out.println("Fridays are better.");
                                  break;How does the compiler know that MONDAY is the same as Day.MONDAY? Is it because of
    switch(day)Then later in the main MONDAY must be prefixed with Day. I removed Day. and it did not compile. Why is Day. necessary in main but not in tellItLikeItIs?
    public static void main(String[] args) {
              EnumTest firstDay = new EnumTest(Day.MONDAY);
              firstDay.tellItLikeItIs();Thank you.

    swtich is a special case.
    The label for each 'case' of a switch
    will infer based on the type of switch value
    switch(d) {
    case MONDAY:
    case TUESDAY:
    will automatically refer to the MONDAY and TUESDAY
    corresponding to d's type.

  • Java Tutorial Enum Types Example

    The Java Tutorial example Planet (http://docs.oracle.com/javase/tutorial/java/javaOO/enum.html), includes the following expression as the denominator of a ratio: EARTH.surfaceGravity(). Could someone please explain how this works. It appears to send the previously defined EARTH constant to the surfaceGravity method with the result being returned to the place where the expression is located. However, normally it is the thing to the right of the dot operator that is sent somewhere and the result is returned to the thing to the left of the dot. Cheers.

    It appears to send the previously defined EARTH constant to the surfaceGravity methodNo. It calls the surfaceGravity() method on the EARTH item, which is a final variable, not a constant.
    normally it is the thing to the right of the dot operator that is sent somewhere and the result is returned to the thing to the left of the dot.Complete nonsense.
    1. The thing to the left of the dot is evaluated
    2. The thing to the right of the dot is invoked with the value of the thing to the left of the dot as the value of 'this'
    3. The thing to the left of the dot is also used to identify the class containing the method if it's a class name. In this case it isn't, it is a variable.
    4. The result of the thing to the right of the dot is returned to as an operand to the containing expression.

  • Error in the java tutorial

    http://java.sun.com/docs/books/tutorial/getStarted/index.html
    the applet can not run.

    I can't get it to run either, on IE nor on Mozilla Firebird (and yes, both are Java 2-capable and I know how to set both up and they both do run Java applets).
    This is the error that I get:java.lang.NoClassDefFoundError: ParseException
         at java.lang.Class.getDeclaredConstructors0(Native Method)
         at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
         at java.lang.Class.getConstructor0(Unknown Source)
         at java.lang.Class.newInstance0(Unknown Source)
         at java.lang.Class.newInstance(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)

  • Trouble understanding "BreakWithLabelDemo" (Sun Java Tutorial)

    Hi.
    I've been slowly working my way through all of the Sun Java tutorials, now I've come across one I just can't wrap my head around.
    It's the "BreakWithLabelDemo" tutorial located at [http://java.sun.com/docs/books/tutorial/java/nutsandbolts/branch.html] that is confusing me.
    class BreakWithLabelDemo {
        public static void main(String[] args) {
            int[][] arrayOfInts = { { 32, 87, 3, 589 },
                                    { 12, 1076, 2000, 8 },
                                    { 622, 127, 77, 955 }
            int searchfor = 12;
            int i;
            int j = 0;
            boolean foundIt = false;
        search:
            for (i = 0; i < arrayOfInts.length; i++) {
                for (j = 0; j < arrayOfInts.length; j++) {
    if (arrayOfInts[i][j] == searchfor) {
    foundIt = true;
    break search;
    if (foundIt) {
    System.out.println("Found " + searchfor +
    " at " + i + ", " + j);
    } else {
    System.out.println(searchfor
    + " not in the array");
    Now it's not understanding what the +break+ statement does that's the problem, it's the nested +for+ loops they've used to demonstrate it that is, and in particularly the code.arrayOfInts[i].length;Now, could someone please enlighten me as to what this statement returns to be evaluated against the variable +j+.
    For instance does it simply return the length of the array +arrayOfInts+ and if so why is it referencing a specific element within the array denoted by the variable +i+ ? Also the array is multidimensional when it's declared and initialized and yet it's treated as a regular array in the code above? Why doesn't that throw an error?
    Any help walking me through this piece of code would be fantastic. Thank you.
    -nexus                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    int[][] arrayOfInts = ...In effect arrayOfInts is a multidimensional array. But it's important to remember that Java has no notion of array dimension. It's just an array - an array consisting of three things in order: {32, 87, 3, 589}, {12, 1076, 2000, 8}, and {622, 127, 77, 955}. It just so happens that these elements are also arrays.
    Because it's just an array arrayOfInts also has a length. The length is three because there's three elements. It doesn't matter that each of the elements has a length 4, arrayOfInts has length 3.
    In this particular array the elements are also arrays, so it makes sense to ask what their length is. For instance, the last one, {622, 127, 77, 955}, is just arrayOfInts[2] and it has length 4. We can refer to its length as arrayOfInts[2].length and write code like:
    if(arrayOfInts[2].length == 4) {
        // this will be executed for the array in the example
    }Where arrays are multidimensional - in the sense that their elements are also arrays - they can be "ragged". For instance
    int[][] arrayOfInts = {
        {32, 87, 3, 589},
        {12},
        {622, 127, 77, 955, -1, 42, 5}
    };The array elements all have different lengths and that is why the inner for loop uses the expression j<arrayOfInts.length so that it loops through the correct number of elements of the i-th element of [i]arrayOfInts.

  • Best Java tutorial

    Hi
    Can anyone recommend some really good online tutorial which teaches java from scratch?
    Theres so many out there don't know which is worth sticking to. Is it better to get a book or what? What do people think of suns tutorials or are third party tutorials more effective?

    And once you have the very basics, the Java Cookbook by O'Reilly is worth 10 times it's weight in gold, shows how to put Java to use in a number of applied solutions, excellent when you're trying to work out how to solve a particular problem.

  • Need help understanding a line of code from the Java Tutorial

    Here is the code I have seen in the Reflection Tutorial:
    import java.lang.reflect.*;
    class SampleInvoke {
       public static void main(String[] args) {
          String firstWord = "Hello ";
          String secondWord = "everybody.";
          String bothWords = append(firstWord, secondWord);
          System.out.println(bothWords);
       public static String append(String firstWord, String secondWord) {
          String result = null;
          Class c = String.class;
          Class[] parameterTypes = new Class[] {String.class};
          Method concatMethod;
          Object[] arguments = new Object[] {secondWord};
          try {
            concatMethod = c.getMethod("concat", parameterTypes);
            result = (String) concatMethod.invoke(firstWord, arguments);
          } catch (NoSuchMethodException e) {
              System.out.println(e);
          } catch (IllegalAccessException e) {
              System.out.println(e);
          } catch (InvocationTargetException e) {
              System.out.println(e);
          return result;
    }There are 2 lines I do not understand (but once I understand one, I'll understand the other).
    Here they are:
    Class[] parameterTypes = new Class[] {String.class};
    Object[] arguments = new Object[] {secondWord};Any explanation will be greatly appreciated :)

    There are 2 lines I do not understand (but once I
    understand one, I'll understand the other).
    Here they are:
    Class[] parameterTypes = new Class[]
    {String.class};
    Object[] arguments = new Object[]
    {secondWord};
    the first line simply creates an array of objects, the objects are of type Class. It then places the object referenced in the brackets into the array.

  • I couldn't run Java Tutorial Sample

    I'am studying java with Tutorial but
    I couldn't run this sample
    OutputApplet.html
    OutputApplet.java
    Error : java.security.AccessControlException:access denied (java.lang.RuntimePermission accessClassInPackage.sun.jdbc.odbc)
    Other files run successful so I think "I don't have Odbc Problem "
    But this sample is applet and doesn't work
    /** OutputApplet.java
    * This is a demonstration JDBC applet.
    * It displays some simple standard output from the Coffee database.
    import java.applet.Applet;
    import java.awt.Graphics;
    import java.util.Vector;
    import java.sql.*;
    public class OutputApplet extends Applet implements Runnable {
    private Thread worker;
    private Vector queryResults;
    private String message = "Initializing";
    public synchronized void start() {
         // Every time "start" is called we create a worker thread to
         // re-evaluate the database query.
         if (worker == null) {     
         message = "Connecting to database";
    worker = new Thread(this);
         worker.start();
    * The "run" method is called from the worker thread. Notice that
    * because this method is doing potentially slow databases accesses
    * we avoid making it a synchronized method.
    public void run() {
         String url = "jdbc:odbc:MyAccess";
         String query = "select COF_NAME, PRICE from COFFEES";
         try {
         Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
         } catch(Exception ex) {
         setError("1: " + ex);
         return;
         try {
         Vector results = new Vector();
         Connection con = DriverManager.getConnection(url,"
    MyUser","MyPass");
         Statement stmt = con.createStatement();
         ResultSet rs = stmt.executeQuery(query);
         while (rs.next()) {
              String s = rs.getString("COF_NAME");
              float f = rs.getFloat("PRICE");
              String text = s + " " + f;
              results.addElement(text);
         stmt.close();
         con.close();
         setResults(results);
         } catch(SQLException ex) {
         setError("SQLException: " + ex);
    * The "paint" method is called by AWT when it wants us to
    * display our current state on the screen.
    public synchronized void paint(Graphics g) {
         // If there are no results available, display the current message.
         if (queryResults == null) {
         g.drawString(message, 5, 50);
         return;
         // Display the results.
         g.drawString("Prices of coffee per pound: ", 5, 10);
         int y = 30;
         java.util.Enumeration enum = queryResults.elements();
         while (enum.hasMoreElements()) {
         String text = (String)enum.nextElement();
         g.drawString(text, 5, y);
         y = y + 15;
    * This private method is used to record an error message for
    * later display.
    private synchronized void setError(String mess) {
         queryResults = null;     
         message = mess;     
         worker = null;
         // And ask AWT to repaint this applet.
         repaint();
    * This private method is used to record the results of a query, for
    * later display.
    private synchronized void setResults(Vector results) {
         queryResults = results;
         worker = null;
         // And ask AWT to repaint this applet.
         repaint();

    Friend try using <code> </code> when you post your program.
    It posts in a better Readable format.
    Ex.
    public class see
    public static void main(String[] args)

Maybe you are looking for

  • How do you unlock an icloud of someone that passed away?

    So I recently broke my iPhone 5s due to an unfortunate accident... Since my family could not afford another, a close friend of mine gave me her old iPhone 4. When I scrolled through the settings to see if I could log into my own Apple account, I saw

  • Best practice for calling stored procedures as target

    The scenario is this: 1) Source is from a file or oracle table 2) Target will always be oracle pl/sql stored procedures which do the insert or update (APIs). 3) Each failure from the stored procedure must log an error so the user can re-submit the co

  • Lumia 800 output speaker problem

    I have an issue very unconfortable with my lumia 800. When I plug it on my desktop speakers to play music and I want to go to the next song it makes an odd sound like a desconexion/conexion of the jack.  Then if I stop the music I hear like a pulse o

  • Adding new segment in IDOC

    Hi,        i have a requirement where based on a condition i need to add a new segment dynamically in Inbound IDOC. I have written the code in the user exit of the inbound FM. Its adding new segments and process it perfectly. But when i see the IDOC

  • PDA: How does the VI in the "Calling External Code (Inline C Method)" example link to the called functions?

    The PDA module provides an example of calling external code via an inline C The inline source code from the example:      OSVERSIONINFO info;      info.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);      Err = GetVersionEx(&info);      MajorVersion = i