Browse P
Alphabetical listing with fast deep pagination.
81033 items • Page 1615 / 1621
public class YClass{ private int a; private int b; public void one() {...} publi
public class YClass{ private int a; private int b; public void one() {...} public void two(int x, int y) {...} public YClass() {...} } public class Xclass extent Yclass { private …
public class Zoo { public static void main(String[] args) { Animal one = new Ani
public class Zoo { public static void main(String[] args) { Animal one = new Animal("Wilder", "black"); Dog two = new Dog("Fido", "brown", "woof…
public class array { public static void main (String[] args){ int[] intArray = {
public class array { public static void main (String[] args){ int[] intArray = {1,2,3,4,5,6,7,8,9,10}; int i = 1; intArray[0] = intArray[4]; …
public class arrayofcards { private int currentCard; //next card index private s
public class arrayofcards { private int currentCard; //next card index private static final int NUMBER_OF_CARDS = 52; // generates random cards private static final Random randomN…
public class binary_sort { public static void sort(int a[],int n){ for (int i=0;
public class binary_sort { public static void sort(int a[],int n){ for (int i=0;i<n;++i){ int temp=a[i]; int left=0; int right=i; while (left<right){ int middle=(left+rig…
public class chapt9Tester { // the tester is complete, just run it after you fin
public class chapt9Tester { // the tester is complete, just run it after you finish the rest of the code public static void main(String[] args) { /…
public class demo01 { public static void main(String[] args){ for(int i=0; i
public class demo01 { public static void main(String[] args){ for(int i=0; i<7; i++){ for(int j=0; j<5; j++) if (Math.abs(i-j)<=j) System.out.print('*');// i want toknow …
public class dr { public static void main(String args[]) { int m, n, i, j; Scann
public class dr { public static void main(String args[]) { int m, n, i, j; Scanner in = new Scanner(System.in); System.out.println("Enter the number of row…
public class ex001 { public static void main(String[] args) { int fre,eng,math,t
public class ex001 { public static void main(String[] args) { int fre,eng,math,total,avg; String w; Scanner keyboard = new Scanner(System.in); do{ do{ System.out.println("pleas…
public class ex04 { public static void main(String[] args) throws IOException {
public class ex04 { public static void main(String[] args) throws IOException { int total = 0; int[] age = null; String[] name = null; age = new int[total]; name = new String[tota…
public class exercises { public static void main (string[] args) {//int[] data={
public class exercises { public static void main (string[] args) {//int[] data={50,20,45}; //int [] data2={-4,-1,-3,-10,-2}; //system.out,println(" min element in data is:" +find …
public class isPrime { public static void main(String[] args) throws FileNotFoun
public class isPrime { public static void main(String[] args) throws FileNotFoundException { isPrime primeNum = new isPrime(); for(int i=1;i<=9999;i++){ if ( …
public class mazeTraversal { static char maze [][] = {{\'#\', \'#\', \'#\', \'#\
public class mazeTraversal { static char maze [][] = {{'#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#'}, {'#', '.', '.', '.', '#', '.', '.', ',', '.', '.', '.', '#'}, {…
public class play { public static final int ONE_PAIR = 1000000; public static fi
public class play { public static final int ONE_PAIR = 1000000; public static final int TWO_PAIRS = 2000000; public static final int THREE_OF_A_KIND = 3000000; public static final…
public class sales_receipt { public static void main(String[] args) { //declare
public class sales_receipt { public static void main(String[] args) { //declare varables final double tax_rate = 0.05; //tax rate String cashier_name = "xxx"; //sales person Strin…
public class scopeRule //Line 1 { //Line 2 static double intRate = 0.055; //Line
public class scopeRule //Line 1 { //Line 2 static double intRate = 0.055; …
public class timebook { private int numberOfEmployees: private int [] [] hours;
public class timebook { private int numberOfEmployees: private int [] [] hours; pirvate int [] weekHours; private int [] dayHours; private static final int NUMBER_OF_WORKDAYS = 5;…
public classAssignment1_final { public static void main(String[] args) { Scanner
public classAssignment1_final { public static void main(String[] args) { Scanner Keyboard = new Scanner(System.in); int option,i,total ; int digit = 10,max,min; int[] value = new …
public classJan19b { public static booleanisPrime(int n) { int root = (int)Math.
public classJan19b { public static booleanisPrime(int n) { int root = (int)Math.sqrt(n); for(int i=2; i<=root; i++) { if ((n%i) == 0) { …
public classcryptosystem { public static void main(String []args) {charoutput[]=
public classcryptosystem { public static void main(String []args) {charoutput[]={'A','B','C','D','E','F','G','H','I','J','K','L','M', 'N','O','P','Q','R','S','T','…
public ctass Runner public static void main(Stringt) args) t //print top header
public ctass Runner public static void main(Stringt) args) t //print top header Animal.printHeader); //Create an animat and print its info //Parameters here are: Nane, age, number…
public double [] stats(Scanner scanner) Given a Scanner of double values, return
public double[] stats(Scanner scanner) Given a Scanner of double values, return an array of capacity three that has the maximum value in the Scanner as the value in result[0], the…
public double[] stats(Scanner scanner) Given a Scanner of double values, return
public double[] stats(Scanner scanner) Given a Scanner of double values, return an array of capacity three that has the maximum value in the Scanner as the value in result[0], the…
public double[] stats(Scanner scanner) Given a Scanner of double values, return
public double[] stats(Scanner scanner) Given a Scanner of double values, return an array of capacity three that has the maximum value in the Scanner as the value in result[0], the…
public enum Distance { SPRINT (750, 20000, 5000), // Easy mode OLYMPIC (1500, 40
public enum Distance { SPRINT(750, 20000, 5000), // Easy mode OLYMPIC(1500, 40000, 10000), // Respectable HALF_IRONMAN(1930, 90000, 21090), // Impressive IRONMAN(3860, 180000, 422…
public final class LinkedBag1 implements BagInterface { private class Node
public final class LinkedBag1<T> implements BagInterface<T> { private class Node { private T data; // Entry in bag private Node next; // Link to next …
public final class LinkedBag1 implements BagInterface { private class Node
public final class LinkedBag1<T> implements BagInterface<T> { private class Node { private T data; // Entry in bag private Node next; // Link to next …
public int Il deck raw can find the best possibte score for the starting player.
public int Il deck raw can find the best possibte score for the starting player. Assume that our : public T int II deck) t this.deck deck; Finds the best score, public int findBes…
public int find(long searchKey) int lowerBound int upperBound nElems-1; int curI
public int find(long searchKey) int lowerBound int upperBound nElems-1; int curIn; 2 while(true) 6 7 curIn (lowerBoundupperBound if(a[ curIn)-#5earchKey) 12; return curIn /found i…
public int manhattanDistance(Point other) Returns the \"Manhattan distance\" bet
public int manhattanDistance(Point other) Returns the "Manhattan distance" between the current Point object and the given other Point object. The Manhattan distance refers to how …
public int search(Object o) //Returns teh 1-based postion where an object is on
public int search(Object o) //Returns teh 1-based postion where an object is on this stack. //The topmost item on the stack is considered to be at distance 1. Add this method to t…
public int value(Node node) { //everything this right in your program just you h
public int value(Node node) { //everything this right in your program just you have to add number of links to the different node value and return it int diffNode=0;…
public int[] frequency(Scanner scanner) Given a Scanner constructed with a Strin
public int[] frequency(Scanner scanner) Given a Scanner constructed with a String containing a stream of integers in the range of 0..10 (like quiz scores), return an array of 11 i…
public interface Cipher {public void setDecrypting(boolean decrypting);public bo
public interface Cipher {public void setDecrypting(boolean decrypting);public boolean isDecrypting();public void setKey(int key);public int getKey();public String getCleartext();p…
public interface Cipher {public void setDecrypting(boolean decrypting);public bo
public interface Cipher {public void setDecrypting(boolean decrypting);public boolean isDecrypting();public void setKey(int key);public int getKey();public String getCleartext();p…
public interface DequeInterface { /** * Adds a new entry to the front/back of
public interface DequeInterface<T> { /** * Adds a new entry to the front/back of this dequeue. * * @param newEntry An object to be added. */ public void ad…
public interface Game // Note *interface* in place of *class* { /// play the gam
public interface Game // Note *interface* in place of *class* { /// play the game and return the final score /// where a higher score should be better, ///…
public interface ISimpleList { protected Node start; protected Node end ; public
public interface ISimpleList { protected Node start; protected Node end ; public int size ; int size(); /** * Add item e to the end of the list * @param e …
public interface List,V> { public abstract boolean add(K key,V value); public ab
public interface List,V> { public abstract boolean add(K key,V value); public abstract V remove(K key); public abstract V remove(int n); public abstract…
public interface Measurable INTERFACE { double getMeasure(); } public interface
public interface Measurable INTERFACE { double getMeasure(); } public interface Measurer CALLBACK { double measure(Object anObject); } public class RectangleMeasurer implements Me…
public interface Printable { public void print(); } public class Printer { publi
public interface Printable { public void print(); } public class Printer { public static void printInvoice(Printable p) { System.out.println("Printing invoice"); …
public interface Printable { public void print(); } public class Printer { publi
public interface Printable { public void print(); } public class Printer { public static void printInvoice(Printable p) { System.out.println("Printing invoice"); …
public interface RemoteControl { public void homeBtn(); public void internetBtn(
public interface RemoteControl { public void homeBtn(); public void internetBtn(); public void navRightBtn(); public void navUpBtn(); public void navDownBtn(); p…
public interface RemoteControl { public void homeBtn(); public void internetBtn(
public interface RemoteControl { public void homeBtn(); public void internetBtn(); public void navRightBtn(); public void navUpBtn(); public void navDownBtn(); public void playBtn…
public interface RemoteControl { public void homeBtn(); public void internetBtn(
public interface RemoteControl { public void homeBtn(); public void internetBtn(); public void navRightBtn(); public void navUpBtn(); public void navDownBtn(); p…
public interface Searcher { // Constants // Declare an integer constant called N
public interface Searcher { // Constants // Declare an integer constant called NOT_FOUND having the value -1 // Abstract Methods // Declare an abstract method called searchFor …
public interface Stack { public void push (T value): public T pop (): } public c
public interface Stack { public void push (T value): public T pop (): } public class LinkedStack implements Stack { private Node first = null: public void push (T value) { Node n …
public member function that returns the height of the tree and a function that r
public member function that returns the height of the tree and a function that return the number of the leaf nodes of the same tree // Program for testing the Binary Search Tree (…
public static ArrayList doArrayListInsertAtMedian(int numItems) { Syste
public static ArrayList<Integer> doArrayListInsertAtMedian(int numItems) { System.out.print("doArrayListInsertAtMedian: "); ArrayList<Integer> list = …
public static ArrayList doArrayListRemoveFromEnd(int numItems) { System
public static ArrayList<Integer> doArrayListRemoveFromEnd(int numItems) { System.out.print("doArrayListRemoveFromEnd: "); ArrayList<Integer> list = new A…