1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

java practice for beginger

Discussion in 'Java' started by vdahake, May 22, 2012.

  1. vdahake

    vdahake New Member

    Joined:
    May 22, 2012
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Please give which are most use in java ( I/O main I/o, Thread, Insert data in MySQL, etc) in work . So i become good java programer in future.
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,276
    Likes Received:
    364
    Trophy Points:
    83
    Thread moved to Java Forum
     
  3. mfred90

    mfred90 Banned

    Joined:
    Mar 28, 2012
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    0
    Here I am trying to give you a tutorial about how to insert value to the database using java.
    Code:
    import java.sql.*;
    
    public class InsertValues{
     public static void main(String[] args) {
     System.out.println("Insert the values to database table!");
      Connection con = null;
      String url = "jdbc:mysql://localhost:3306/";
      String db = "jdbctutorial";
      String driver = "com.mysql.jdbc.Driver";
      try{
      Class.forName(driver);
      con = DriverManager.getConnection(url+db,"root","root");
      try{
      Statement st = con.createStatement();
      int val = st.executeUpdate("INSERT employee VALUES("+13+","+"'Aman'"+")");
      System.out.println("1 row affected");
      }
      catch (SQLException s){
      System.out.println("SQL statement is not executed!");
      }
      }
      catch (Exception e){
      e.printStackTrace();
      }
      }
    }
     
    Last edited by a moderator: Jun 4, 2012
  4. RGabriel

    RGabriel New Member

    Joined:
    Oct 17, 2015
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    You will need to learn I/O first, as its most used in java.
    After that you can learn, Thread.
     
  5. alia123

    alia123 New Member

    Joined:
    Jan 8, 2016
    Messages:
    65
    Likes Received:
    3
    Trophy Points:
    0
    Hello,first of all if have knowledge of C and C++ and then you are going for java then it's sure that you will be a good programmer as C and C++ basics are mostly used in java.Secondly,I/O is the main thing you have to aware of it as it's used more and rest you will learn step by step.w3schools provide good tutorials if you need to follow them go through it.Else you can even visit a site" http://keenesystems.com/Services/SoftwareDevelopment.aspx "for help from developers for more help.
     
  6. RRT2010

    RRT2010 New Member

    Joined:
    Apr 7, 2011
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    India
    All three are equally important and easy to learn quickly. To be a good programmer , you need to see how efficiently you can use them to match the non functional requirements like performance,accessibility.
     

Share This Page