Category Archives: java

Sort int array elements from High to Low : Java

/** * Sort int array elements from high to low. * http://www.victorbyte.net/ * void method */ public static void arraySortHighToLow(int[] array) { int temp = 0; for (int loop = array.length – 2, index = array.length – 1; loop >= … Continue reading

Posted in algorithms, java | Leave a comment

Java asterix pyramid

import java.util.Scanner; /** * * @author blogger.victorbyte.net * 30/08/2010 */public class Main { static String outPut = “”; static int errorLimit = 0; static Scanner userInput = null; static int getIntegerInput() { int value = 0; userInput = new Scanner(System.in); … Continue reading

Posted in java | Tagged | Leave a comment

Cashier Calculator

import java.util.Scanner; /** * * @author Victor */public class Main { static int numberOfErrors = 0; //Pricing variables static double provincialTaxRate = 0.00; static double federalTaxRate = 0.00; static double itemPrice = 0.00; static double subTotal = 0.00; static Scanner … Continue reading

Posted in double format two decimal places, java | Leave a comment