What is DaniWeb IT Discussion Community?
DaniWeb is a massive community of
374,568 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are
2,510 IT professionals currently interacting right now!
Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
An example of method overloading. The program calls a function to get the square root of a number. The appropriate function (integer or double version) is executed.
(View Snippet) The JOptionPane class is used to give the CompMortgage.java program a front-end GUI interface. The class is divided into numerous functions.
(View Snippet) A program similar to ComputeMortgage.java utilizing a mathematical formula and multiple methods to calculate a loan payment.
(View Snippet) A single class consisting of multiple methods is used to demonstrate the robustness of keyboard input in Java. A try-catch block is used. The program graphically prints out a square root table by using JTextArea, JScrollPane and JOptionPane.
(View Snippet) A demonstration of introductory object oriented programming. A class to define a circle object with radius, area, and perimeter parameters.
(View Snippet) This program consists of two functions in one class. It is the driver program for the CircleClass.java file.
(View Snippet) A program similar to CircleClass.java which defines a rectangle object. ClientProgram.java is the driver program for the Rectangle.java file.
(View Snippet) Two classes which aim to demonstrate private and public members of a class. A static variable is used as an accumulator to keep track of the number of class objects which are created.
(View Snippet) A program combining a switch statement with static variables in a class. Based on the switch statement, a class object is dynamically created.
(View Snippet) This program consists of one function in one class. It uses MyInput.java to demonstrate how primitive data types are implemented in Java.
(View Snippet)