No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
- Interests
- Programming, OS Development
- PC Specs
- Linux
Re:
i have a bit a weak understanding of those 2 concepts. could you explain to me what is happening in that part of the code? [CODE] public class Part5{ public static void main(String[] args) { // Object[] zoo=new Object[4]; // zoo[0]=new Cat(); Object[] animals=new Object[4]; animals[0]=new Cat(); animals[1]=new Dog(); animals[2]=new … |
|
Re:
Hi, I want to code a client/server app such that there will be one server and multiple clients interacting with the server. The clients will send messages, like "Hello, server," and the server will send messages back. I know how to write a simple client/server app, however im confused as … |
|
Re:
what is the size of boolean data type in java? |
|
Re:
I keep getting these errors when I try to run the program Exception in thread "main" java.lang.NumberFormatException: For input string: "GTR" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) at java.lang.Integer.parseInt(Integer.java:449) at java.lang.Integer.parseInt(Integer.java:499) at Inventory6.addProductToInventory2(Inventory6.java:549) at Inventory6.main(Inventory6.java:734) I've spent hours trying to figure out what I'm doing wrong and it's due in a few hours. I … |
|
Re:
I have a problem involving Generics. Here's a simplified version: Suppose I have a generic method to add a new element to a (possibly empty) ArrayList, like this: [CODE]<T> void addNewTo(ArrayList<T> list)[/CODE] What I need to do is to determine the correct class for the ArrayList elements so as to … |
|
Re:
Hi all [CODE]import java.io.*; public class POManager { private static String posFname = "C:/ITM200/OOP-Advanced-Topics/src/po.txt"; private static String taxposFname = "C:/ITM200/OOP-Advanced-Topics/src/tax.txt"; public static void main(String [] args) throws IOException { PO[] pos = readPOFile(); writePOTaxFile(pos); } public static PO[] readPOFile() throws IOException { BufferedReader in = new BufferedReader(new FileReader(posFname)); in.readLine(); String … |
|
Re:
My code: [CODE] package big; import java.math.BigInteger; public class Main { public static void main(String[] args) { System.out.println (factorial (5)); } public static int factorial (int n) { int f = 1; for (int i = 1; i <= n; i++) { f = f * i; } return f; … |
|
Re:
Hi all, Does anyone know of a way to scan a character from the command line without the enter key having to be pressed? For example, the user would type 'a', which is then picked up and scanned by the program and stored, etc. The only way of scanning input … |
|
Re:
Can someone help me with error trapping. For instance, if I asked the user to input only a numeric type, 0-9. Then how would I go about creating an error message if the user inputs "hey." I know that I could easily use the Try, Catch statements but I want … |
|
Re:
Hi how can i get linux distributions name in java ??? i try it by Syatem.getProperty("os.name") but this return only "Linux" !!! is any way to return like fedora , suse , ... ??? thanks |
|
Re:
My task is: The Captain Crunch decoder ring works by taking each letter in a string and adding 13 to it. For example, ’a’ becomes ’n’ and ’b’ becomes ’o’. The letters “wrap around” at the end, so ’z’ becomes ’m’. Write a method that takes a String and that … |
|
Re:
hi all i need a bubble sort algorithm in Java and make a class bubble_sort to sort any given array of any user defined type. can any of u give me a basic algoruthm i need to work with???? |
|
Re:
Hi, I am trying to write to a .txt file an integer but the characters I see when I open the file are strange. Could you tell me what happens ?? [CODE] import java.io.*; public class A { public static int readInt() { byte b[] = new byte[16]; String str; … |