Quiz Page java The java quiz has changed! We have replaced java questions with answers! And from those answers you'll find further links to even more information - forums where you can ask questions, training courses, longer articles, and more. [link to quiz index] ...
If you really want the old quiz
questions, you can find them
here,
here,
here and
here ... and
with onward links to the possible answers to each question too.
Client side (Applet) and Server side (Servlet) Graphics in JavaWhat is the current release of Java? Is it Java 1.6, Java 2 (1.6) or Java 6? Yes it is - they're all different names for the same thing!
Java started out as Java 1.0 ... and since code that would ...
Dripping taps, Java threads and the single thread modelHave you ever lain awake at night and listened to dripping taps. "drip, drip, drip" ... until you eventually fall asleep? With one tap, it's rhythmic, but with two taps the two rhythms get ...
Abstract Classes - JavaIn Java you can write a class from scratch, or you can write one class based on another, using the 'extends' keyword and providing only the methods that change in the new class from the base class, ...
Choosing the right version of Java and TomcatJava is described as being a portable language. But that only means that the 'runnable' class files are fairly portable - you must download and install the correct Java Virtual Machine / Java Runtime ...
Servlet life cycle, and Java Servlet variable scopeIf you write a 'traditional' program and run it ... then it is cleared from memory when you finish running it. It does its job then exits. And so it is with a java program that you run from the ...
CATALINA_OPTS v JAVA_OPTS - What is the difference?There are two environment variables - CATALINA_OPTS and JAVA_OPTS - which are both used in the catalina.sh startup and shutdown script for Tomcat. They are described in comments within that file as: ...
Bean Classes in Java and Java Database Connections A class is a bean if it has a constructor that takes no parameters, and if it has methods that start with "get" to read properties, and "set" to set properties. And it's a good idea (!) if the ...
Class Loading and Variable Conversion in Java "Where did you get THAT from?" Ever heard that question? I've asked it of Java sometimes, in wondering where a Java virtual machine has found a class from ... and it's not always obvious.
When ...
Variable scope in Java Servlets and other web applicationsHow long does a variable last? When you set a variable in a Java Servlet (a Java programming that's running on a web server in a container such as Tomcat), the variable may ...
• be local to ...
A very easy JSP (Java Server Page)"Can you give me an easy first example" ... a common question on a course and - yes, I usually can. And so can other tutors. But then they go on and add things to make them complicated. So here is ...
Javascript - move cursor over image to change a different image.Let's imagine that you have an image which is a map on your web page, and as you move over the map you want another image (elsewhere on the page) to change to show the place you're pointing too. ...
Java on the Web Server - course for delegates with some prior Java experienceWe're running a one-off public course from 29th April to 1st May 2009 - 3 days - for delegates with prior Java experience who want to learn about how to use it on the web - that's servlets, sessions, ...
Finding your java program - the CLASSPATH variableWhen you run a Java 'program' (strictly, the main method of a class), it looks for that class in a file with the name given and with a .class extension in the places listed in the CLASSPATH ...
Which Version of Java am I running?Write a test program to use the getProperty method on System:
public class Sample {
public static void main (String [] args) {
System.out.println("*** Hello Melksham ***"); ...
C, C++ and C# ... Java and JavaScriptWith all the words in the world, and the ability to make more up, isn't it astonishing that we have in our business some confusingly similar names for programming languages!
C v C++ v C#
C is the ...
Comparing Java Courses - what can we do?In answer to the question "Graham - what options can you offer me for a course similar to [gave me URL of an advanced server side Java course run by another training company, but not scheduled until ...
Java - Memory Allocation and garbage collectionWhen you're running a dynamic application (and most of the languages we teach these days are dynamic), memory is allocated and released as necessary at run time, with allocation happening 'as ...
Learning to program in PHP, Python, Java or Lua ...... or in Ruby, Tcl, C, C++ or Perl
Are you new to computer programming? Is it so long since you programmed that you feel very rusty and would like to start again from basics? If you've said "yes" to ...
Java Tag Libraries / how they work / Tomcat DeploymentA Java (JSP) tag library is a set of additional XML tags that you can include in your Java Server Page in order to create objects and set and get the attributes of those objects. Let's see an ...
Best source to learn Java (or Perl or PHP or Python)An impossible question - there is no best way - yet it's one that I'm asked from time to time. [["Hello. I'm doing a b.tech. My friends like ur site very much. Plz help us in Java programming - plz ...
Predictive Load Balancing - PHP and / or JavaLoad Balancing Algorithms - the standard offerings
How do you share out the requests when you're load balancing? The computer (or other device) that's sharing out the load needs to make a decision ...
Java - GenericsIf you're writing a Java program and you want to hold a whole series of objects of a similar type in a single variable, you can use and array ... except that you need to know HOW MANY of them there ...
javax.servlet cannot be resolved - how to solveTwo common problems in compiling Servlets for use within a Tomcat container ...
PROBLEM: My Java Compile of a Servlet says "javax.servlet cannot be resolved"
For example:
...
Java CLASSPATH explainedWhen you run a Java program (be it though the java virtual machine or as a servlet within a web or application container such as Tomcat), it's only the main code (class) that's initially loaded. Any ...
Long, Longer, Longest in JavaIf you want to find out how long a Film3 is, in the class that I use on our private Java Programming courses, you can call the getminutes method. That's standard OO stuff. But what if you want to ...
Pascals Triangle in Python and JavaThere are certain "party pieces" that I have during courses ... and on my Java Courses, a program to generate Pascal's Triangle in an array of arrays is one of them.
One of my delegates on today's ...
Javascript/HTML example, dynamic server monitorThere are times I want to keep an eye on our servers, but I don't really want to redraw my whole browser window (or even a frame!) to do it. So I've written a Javascript application to run in my ...
More HowTo diagrams - MySQL, Tomcat and JavaHere are some more diagrams "off the wall" from last week - showing "howto" and "whatis" information for Tomcat, Java and MySQL
Some Tomcat and Java Fundamentals
On the right of the board ... the ...
Diagrams to show you how - Tomcat, Java, PHPI like to work with a flipchart occasionally, and I have been doing so quite a bit this week, which is a week that I'm giving a wide ranging web server deployment course under Linux, covering both ...
Increasing Java Virtual Machine memory for TomcatQ. "How do I increase the memory that my Java Virtual Machine in Tomcat can use?" A question asked - not for the first time - by a delegate on todays's Deploying Apache httpd and Tomcat course.
A. ...
Linux and Java Course in LondonThere are certain locations which used to fill me with horror as to how I was going to work out the logistics of getting my equipment in and out for a course. And today's was one of those for which I ...
Ruby, C, Java and more - getting out of loopsbreak and continue statements have been available for loop control for many years, and others functionallity has been added such as Perl's redo. From today's Ruby Course, here's a table that ...
Java Compiler - needs all classes, compiles them all tooRemember that when you compile a java source file ...
a) You must have the classes it will use when it runs available to the compiler so that it can check (a bit frustrating at times if you're ...
Trying out our Java examples on our web siteWe've included all of the source code of our training examples on this web site for quite a long time now ... and about a year ago we put working copies of most of the PHP scripts up there too (we ...
Java - a demonstration of inheritance on just one pageHere's a challenge, just given to me by my Java Delegates, to put my complete example of a Rectangle and a a Circle class, both inheriting from a Shape base class, and a test harness ... on on a ...
Java (JSP and Servlet examples) live on our serverOn our Java Programming for the Web and Deploying Apache httpd and Tomcat courses, we provide a ready-written demonstration that includes simple web pages, a basic JSP, JSPs with tag libraries, and a ...
Learning Object Oriented Principles (and perhaps Java)During an intensive 3 day Java course last week, I gave an introduction to the principles of Object Oriented Design, and a very short segment on design principles (there's a limit to how much can be ...
Teaching Object Oriented Java with Students and Ice Cream"I'm getting tired of students. Can we do something else". So said my delegates at Cardiff University today. So we did Ice Cream and other deserts!
Perhaps I had better explain. I'm running a Java ...
Java, sorting, ArrayList example, genericsA Java ArrayList holds an ordered sequence of items like an array, but there are differences:
1. An ArrayList has no fixed size but can be extended by adding elements later
2. An ArrayList can only ...
Java - using super to call a method in the parent classIf you're writing a Java class in which you override a method from the base class, can you still make use of that base class method in your new code? Yes, you can. You want the super call.
Here's ...
|
|