how much efficient is JAVA for programming.........

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AmberJain
    Recognized Expert Contributor
    • Jan 2008
    • 922

    #1

    how much efficient is JAVA for programming.........

    I'm not a JAVA newbie.....

    I'm ABSOLUTE JAVA illiterate person......... .........

    Recently, while I was planning to learn a new programming language, one of my friends advised me to learn JAVA.
    Now I'm confused in choosing which language I should start learning.

    So, I have some questions regarding JAVA, which are really EASY to answer (for you techies). Please answer them if you can.
    _______________ _______________ _______________ _______________ _____
    _QUE 1_ Is it possible to write an Operating System in JAVA ? If yes, then is it easier to code an OS in JAVA than other High and middle level languages?

    _QUE 2_ Is it possible to include statements from other languages (especially Assembly) to be included in java code?

    _QUE 3_ Is it possible to write highly machine specific code in JAVA?

    _QUE 4_ Is it possible to write a boot loader in JAVA?

    _QUE 5_ Is graphics programming possible in JAVA? (I expect this answer to be YES).

    _QUE 6_ Is network programming possible in JAVA?
    _______________ _______________ _______________ _______________ _____

    PLUS, If you want to tell me more features of JAVA (which might be helpful to me to choose my next programming language). Let me tell you that I presently know to code in C\C++\Assembly and so you may also tell me a comparison between C\C++\ASM and JAVA.

    PLUS, tell me incapabilities of JAVA (if they exist).

    THANKS TO EVERYONE IN ADVANCE........ ......

    ============
    AmbrNewlearner
    ============
  • Nepomuk
    Recognized Expert Specialist
    • Aug 2007
    • 3111

    #2
    Originally posted by ambrnewlearner
    _QUE 1_ Is it possible to write an Operating System in JAVA ? If yes, then is it easier to code an OS in JAVA than other High and middle level languages?

    _QUE 2_ Is it possible to include statements from other languages (especially Assembly) to be included in java code?

    _QUE 3_ Is it possible to write highly machine specific code in JAVA?

    _QUE 4_ Is it possible to write a boot loader in JAVA?

    _QUE 5_ Is graphics programming possible in JAVA? (I expect this answer to be YES).

    _QUE 6_ Is network programming possible in JAVA?
    _______________ _______________ _______________ _______________ _____

    PLUS, If you want to tell me more features of JAVA (which might be helpful to me to choose my next programming language). Let me tell you that I presently know to code in C\C++\Assembly and so you may also tell me a comparison between C\C++\ASM and JAVA.

    PLUS, tell me incapabilities of JAVA (if they exist).

    THANKS TO EVERYONE IN ADVANCE........ ......

    ============
    AmbrNewlearner
    ============
    Hi!

    Let's see...

    _ANS 1_ Possible? Yes. A good Idea? Hell, no! If you want to write an OS, C or C++ would be a much better choice!

    _ANS 2_ Also possible, but (as far as I know) only with some nasty workarounds.

    _ANS 3_ No. Well, theoretically probably yes, but again, I'd recommend a language like C or C++

    _ANS 4_ -> _ANS 3_

    _ANS 5_ Yes, Java has a very nice library called Swing, which is for graphical programming. It needs a bit of work to understand, but it works fine

    _ANS 6_ Also yes, it's even quite easy! I've started writing a tutorial about it in the Howto section, so as soon as you understand enough of the basics, you can check that out!


    One great advantage of Java is, that it's very good for multi-platform projects. While with C++ you have to compile your program for every Platform you want to run it on, with java you translate it once (it's not really a compilation) and it will run (or not run ^^) on any platform. Well, at least if you don't use anything platform specific (which, in most cases, you won't).

    A disadvantage of the multi platform system is, that as Java runs in a VM (the JVM), it is slower than an equivalent program in a language like C++.

    For someone who already knows C++, Java should be easy to learn. The syntax and keywords are mostly copied from C++ and you can even leave things out. Garbage collection isn't anything the programmer has to think about. Of course, that means that you can't make sure, that garbage is collected, when you want it collected. Also, Java doesn't use pointers.

    Oh yes, Java is often used for web applications and has good libraries for that.

    OK, I can't think of anything else right now.

    Greetings,
    Nepomuk

    Comment

    • JosAH
      Recognized Expert MVP
      • Mar 2007
      • 11453

      #3
      More than eleven years ago Sun produced a CPU that has Java byte code as its
      machine code; Java ran on that thing natively, so the answer is yes to all the OS
      related questions.

      Since Sun increased its hotspot aggressive compilation technique there's no
      difference between C or C++ generated machine code and Java's JIT compiler
      output (which happens to be native machine code too).

      kind regards,

      Jos

      Comment

      • AmberJain
        Recognized Expert Contributor
        • Jan 2008
        • 922

        #4
        Originally posted by nepomuk
        Hi!

        Let's see...

        _ANS 1_ Possible? Yes. A good Idea? Hell, no! If you want to write an OS, C or C++ would be a much better choice!

        _ANS 2_ Also possible, but (as far as I know) only with some nasty workarounds.

        _ANS 3_ No. Well, theoretically probably yes, but again, I'd recommend a language like C or C++

        _ANS 4_ -> _ANS 3_

        _ANS 5_ Yes, Java has a very nice library called Swing, which is for graphical programming. It needs a bit of work to understand, but it works fine

        _ANS 6_ Also yes, it's even quite easy! I've started writing a tutorial about it in the Howto section, so as soon as you understand enough of the basics, you can check that out!


        One great advantage of Java is, that it's very good for multi-platform projects. While with C++ you have to compile your program for every Platform you want to run it on, with java you translate it once (it's not really a compilation) and it will run (or not run ^^) on any platform. Well, at least if you don't use anything platform specific (which, in most cases, you won't).

        A disadvantage of the multi platform system is, that as Java runs in a VM (the JVM), it is slower than an equivalent program in a language like C++.

        For someone who already knows C++, Java should be easy to learn. The syntax and keywords are mostly copied from C++ and you can even leave things out. Garbage collection isn't anything the programmer has to think about. Of course, that means that you can't make sure, that garbage is collected, when you want it collected. Also, Java doesn't use pointers.

        Oh yes, Java is often used for web applications and has good libraries for that.

        OK, I can't think of anything else right now.

        Greetings,
        Nepomuk
        THANKS Nepomuk........ .

        ============
        AmbrNewlearner
        ============

        Comment

        • AmberJain
          Recognized Expert Contributor
          • Jan 2008
          • 922

          #5
          Originally posted by JosAH
          More than eleven years ago Sun produced a CPU that has Java byte code as its
          machine code; Java ran on that thing natively, so the answer is yes to all the OS
          related questions.

          Since Sun increased its hotspot aggressive compilation technique there's no
          difference between C or C++ generated machine code and Java's JIT compiler
          output (which happens to be native machine code too).

          kind regards,

          Jos
          Well, this is quite technical information, but no doubt "very very useful" for me.
          THANKS JosAH.........

          =============
          AmbrNewelearner
          =============

          Comment

          Working...