×

Loading...

Topic

  • 枫下沙龙 / 游山玩水 / Java Q&A (1)
    • Q: Jabber, can you recommend some Java books?
      A: Yes. There are a lot of good Java books on the market. You don't need have many Java books. The following is my recommendation:

      1) Thinking in Java

      Bruce Eckel / Prentice Hall / 2000 / 0130273635 / 2nd Bk&cdr

      This book contains in-depth thinking about Java languages.

      If you want to save money, you may download an electronic copy from www.mindview.com.

      2) Core Java 2, Volume 1, Fundamentals;
      Core Java 2, Volume 2, Advanced Features

      Cay Horstmann, et al / Prentice Hall / 1999 / 0130819336 / Bk&Cd Rom

      These two books contain comprehensive coverage of Java language and many of their examples are valuable.
    • Q: How long will it take me to become a Java programmer?
      A: Hard to say. It depends upon your background and your hard working. I think it will take you at least 6 months if you don't have any programming experiences. If you want to enjoy the high salaries of Java programmers, you need first spend some time on preparing your skills.
    • Q: To learn Java, do I need some C++ backgrounds?
      A: No. If you have C++ background, you can carry some of C++ concepts into your Java learning. Java can be thought of as a simplied C++, so you can learn it directly, even you are a layman for IT industry. Jabber did not know C++ well as he began to learn Java. He did not find any necessities to learn C++ first.
      (But now Jabber is studying C++ seriously.)
    • Q: How to choose a training center where to learn Java?
      A: You need to ask the training centers to allow you to attend a few hours'
      free classes. If you think that you are attracted by the teacher's teaching, join them. In addition, if you want to learn professional Java programming, you need to learn about training center's hardware condition.

      If the training center uses Windows 95/98 for teaching, I suggest you don't learn Java Servlets and Enterprise JavaBeans with it. Without Windows NT server or workstation, one cannot learn true Java Servlets and Enterprise JavaBeans. If possible, you should set up your own Windows NT box at home.
    • Q: Jabber, can you give me some Java interview questions?
      A: Yes. I will do it one by one. To satisfy you, I throw one question here:

      What is the major difference between EntityBean and SessionBean in EJB?
    • Q: Jabber, can you tell me your experience in learning Java?
      A: Yes. Grab a book. Type the example code into my computer. Compile it. Run it. Make things work first. Then I have a feeling of achievement. Now try to understand the code from the
      very beginning to the end.

      After that, I try to modify the code piece by piece and see what happens.

      Finally, I ask myself: When will this piece of code useful? Should I forget this example?
    • Q: Why Java is easier to learn than C++?
      A: Java is a high-level langauge. Its syntax is similar to the human language. As you write Java code, you are actaully writing English according to a specific set of rules(syntax).
    • Q: Jabber, what do you mean by "high-level"?
      A: "High-level" does not mean "advanced". In IT industry, people means "not-detailed" by "high-level".

      If poeple say somebody is at a high-level, that means he/she cares for the big picture only.
    • Q: Jabber, I tried to run some example code on my Windows 98. As I tried to compile the code, I got an error message saying "Bad commands or ....". What's wrong?
      A: Let me say you are trying to compile a source file called "Hello.java".

      Your commands may be as follows:

      javac Hello.java

      Here is the mechanism how things go on. Your computer will try to find Java compiler, i.e., javac.exe, according to an environment variable called PATH. Ususally, if you install JDK at disk C, your Java compiler (javac.exe) resides at

      C:\jdk1.2.2\bin.

      The error message implies that your PATH does not contain C:\jdk1.2.2\bin, so your computer cannot find Java compiler. Then, it complained that javac is a bad command because it does not understand "javac".

      To check your problem, you can type "echo %PATH%" in MS-DOS. Then, you will see your full PATH.

      To remedy your probelm, you can re-set PATH by your self. In MS-DOS, issue the command "set PATH=C:\jdk1.2.2\bin". Then, compile your example code and the machine won't compile so-called "Bad command ....".
    • I met one compiling error on NT workstation...
      Q: Jabber, I am working on Windows NT workstation. As I tried to compile some Java code, I got the following lengthy error message:

      "The name specified is not recognized as an
      internal or external command, operable program or batch file."

      Is this the same problem as "Bad Command ... " at Windows 98?

      A: You are absolutely right! It is the same PATH problem but it has a different error message.
    • I can not open http://www.mindview.com.hy?
      • Should be www.mindview.net or www.bruceeckel.com
        • thank you, I got it.It is www.mindview.net