Posts

Showing posts with the label Loop

Foreach Loops | For enchanced loop in java

Image
JDK 1.5 introduced a new for loop known as foreach loop or enhanced for loop, which enables you to traverse the complete array sequentially without using an index variable. The following code displays all the elements in the array myList: public class TestArray {    public static void main(String[] args) {       double[] myList = {1.9, 2.9, 3.4, 3.5};       // Print all the array elements       for (double element: myList) {          System.out.println(element);       }    } } For Example:  This would produce the following result: 1.9 2.9 3.4 3.5

Pocket Bank System with GUI (Version 2.1.5) | Full working Software for bank | Source code of Bank Software in Java (Version 2.1.5)

Image
Promotion Source code: //************************************************************ //Pocket Bank System (Version 2.1.5) //Written in Java By Syed Ali Haider //Student of The Hajvery University,Lahore, Pakistan. //Don't remove these lines for legal use //For more Please contact us. //Very Soon more efficient and better Version launched //************************************************************ // import starting import java.awt.Component; import javax.swing.JDialog; import javax.swing.JFrame; import javax.swing.JOptionPane; // for dialog box //import ending public class pocket_bank_system // java is the name of class { //class starts from here            static long balance=1000; // balance in account initially     static long withdraw; // for withdraw     static long transfer; // for transfer     static long ...