Skip to main content

5 Java Beginner Questions & Answers

What was the original name of Java?
  • Oak
Oak was the original name. JavaScript stole its name from Java. James Gosling created Java, and Lisp was just one of the inspirations.

What is the name of the Java mascot?
  • Duke
Duke is the name. Jonathan and Whit no longer work for Sun/Oracle.
What is not true about JavaBeans?
  • They're fully compiled to native code.
JavaBeans are intended to be passed around as Java objects and accessed by methods that can be discovered by tools. They aren't normally compiled to native code unless the JVM does it during execution. 
JavaFX is:
  • A language for building browser-based content
 JavaFX works like Flash and is meant to offer nice, antialiasing in the browser, among other things.
OpenJDK is not:
  • An open source tool for running Java in your browser or through Web Start
The OpenJDK is a GPL-protected stack of code that includes a virtual machine and many Java APIs. It is not normally used to run Java in your browser -- unless you take advantage of the open source license to create a browser plug-in, as some have done.

Comments

Popular posts from this blog

Exercise 1: 99 Bottles of Beer

Let’s put all your new Java skills to good use with something practical. We need a class with a main(), an int and a String variable, a while loop, and an if test. A little more polish, and you’ll be building that business backend in no time. But before you look at the code on this page, think for a moment about how you would code that classic children’s favorite, “99 bottles of beer.” There’s still one little flaw in our code. It compiles and runs, but the output isn’t 100% perfect. See if you can spot the flaw , and fix it. public class BeerSong { public static void main (String[] args) { int beerNum = 99; String word = “bottles”; while (beerNum > 0) { if (beerNum == 1) { word = “bottle”; // singular, as in ONE bottle. } System.out.println(beerNum + “ ” + word + “ of beer on the wall”); System.out.println(beerNum + “ ” + word + “ of beer.”); System.out.println(“Take one down.”); System.out.println(“Pass it around.”); beerNum = beerNum - 1; if (...

Java Heap Space Exception, One of Weired Issue for Java Developer

Running Java application requires a lot of memory to load, execute and running. When you run one of the Java application, it does not only your application need memory but the web container such as Tomcat also required. It is more annoyed for you as a developer that you use many development tools that running on JVM such as Maven, Eclipse IDE, Tomcat and other stuffs. The memory firstly is about your RAM, regularly, you might have only 8GB RAM as normal as mine that I though it's enough but usually, it's not. Let's look to your Eclipse, the autocomplete code there, number of Java files and other automatic stuffs you do on the IDE that keeps you slowing everytimes; So that by theory, 8GB still not enough to go. Java heap issue can be solved by setting the right use of the memory as following way: -Xms<size> - Set initial Java heap size -Xmx<size> - Set maximum Java heap size Example: java -Xms512m -Xmx1024m JavaApp But never forget to calculate ho...