- Strength to Increase Rep
- +6
- Strength to Decrease Rep
- -1
- Upvotes Received
- 51
- Posts with Upvotes
- 49
- Upvoting Members
- 29
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
Hello, First off, i did try looking around the forum but i couldn't understand. Here's a few question which i need help with: 1) (adding node at head) i don't know how does the head will hold the reference to the next node, the code is like this: [CODE] //at … |
|
hello, i have this assignment but i got stuck on number 2. Question 1: Create a 3x3 array, each filled with a digit 1-9 so that the array resembles a num pad. Use for loops and construct 3 different, correct ways to print the elements of this array. **Question 2**: … |
|
here i've created the first applet but it is not working, [CODE] import java.applet.Applet; import java.awt.*; public class FirstApplet extends Applet { public void paint(Graphics g) { g.drawString("Look at me, I'm a Java Applet!",10,50); } } [/CODE] i am getting no errors but when i am opening the html file … |
|
when i do... [ICODE]String menu; Scanner keyboard = new Scanner(System.in); menu = keyboard; if (menu = "D"){ .... }[/ICODE] there is error sign under "menu = "D"" <can't convert String to boolean> why menu is boolean? I stated in String.... |
|
main() is a static method and is part of class. Then how is it that main can access instance members? |
|
How can i add some space between these four components and the JFrame window? ![jframe_view](/attachments/large/0/jframe_view.jpg "jframe_view") |
|
I do not want to accept same letter to guess and if does , want to show caution and force to type another try... and If user got correct letter than I do want to show the letter instead of "_" _ _ _ _ _ (Example, word is school … |
|
My program receives no errors or run time errors, but for some reason it runs infinitely. I need help pinpointing the problem D: I will post additional information about the exercise I am trying to solve in this thread. [CODE] package captcrunch; /** * * @author Josh */ public class … |
|
Hi, I have to read and store 70 millions of Double objects in a Vector. The problem is that it seems that Java will allocate 40 bytes of memory for each Double object and the memory amount we need to store such number of Doubles object is approximately 2.8 GB. … |
|
i have an array like this: [B]String[][] data= {"s", "w","s", "y", "r", "r", "y", "p"};[/B] i wanna do some action if there was no similar array element before that particular element, for example, do something if [B]data[0]=="s"[/B], then do something if [B]data[1] == "w"[/B], but skip when [B]data[2]=="s"[/B], because [B]"s"[/B] … |
|
I have been trying to make my program load the images while using web start with no success. The following code is inside an extended JButton class. Image is a string containing the address of the desired image ("0.jpg", for example), I know that this would only work if the … |
|
I have a simple jpg image saved in a field of type longblob. Now i need to get that image and put it in a JLabel or something similar to show the picture in the program. Anyone knows how can I do that please? I already know how to get … |
|
I am supposed to take this program and use a method to tokenize the inputted string into words and store them into an array of strings. Then use another method to print the array element one word per line. I need help on the first method, trying to tokenize and … |
|
Hello Everyone I was instructed to do the following but came up with 10 errors which are listed below can anyone please help with this. Write a sentinel loop that will sum all positive integer values entered; use a negative number to end the loop. Be sure to test for … |
|
I don't know why I keep getting an InputMismatchException :/ It highlights when I call the load() method. Thanks [CODE] import java.util.*; import java.io.*; public class GradeManager { private ArrayList <Student> StudentGrades; public GradeManager(){ StudentGrades=new ArrayList<Student>(); load(); } public void load(){ Scanner fileIn=null; try{ fileIn=new Scanner(new File("grades.txt")); }catch(FileNotFoundException e){ System.out.print("Cannot … |
|
Hey all, I have some code here for a red black tree that prints out in preorder traversal. The entire program works fine and prints out to a file when I run from the terminal "java Main.java<input1.txt>output.txt", however I need set it up so it writes to standard output "output.txt" … |
|
i really need help... i dont know where the problem... the line error on that part>>`class reserveform extends JFrame implements {` import java.awt.Dimens; import java.awt.*; import javax.swing.*; import java.util.List; import java.util.LinkedList; import java.util.Iterator; import java.util.ListIterator; import java.util.Collections; import java.awt.event.*; class reserveform extends JFrame implements { // operation interface JPanel operation; … |
|
Hello i'm having a problem with a program. Let me tell you first what program should do. The program should allow the tutor to enter in the various marks which the students have been awarded, until the tutor enters in a mark exceeding 100. At this point the program should … |
|
new in here, new in java world and new in programming at large, but i believe i can learn with the help of professionals and educators in the house. Don't be surprise am staring from such task as a newbie, it 'cos am made to believe i must find a … |
|
[CODE]mport java.net.*; import java.io.*; class Ur { public static void main(String[] arg) throws Exception { URL u = new URL("http://www.whitehouse.gov/"); InputStream ins = u.openStream(); InputStreamReader isr = new InputStreamReader(ins); BufferedReader whiteHouse = new BufferedReader(isr); System.out.println(whiteHouse.readLine()); } }[/CODE] It shows the error.. when i changed the site to [url]www.google[/url] .com \Program … |
|
Hi guys, This week Ive been wrecking my head trying to write a code to run the following program: This program must test the dice 50 times. Then the results will be recorded and summarised. For each number (1 to 6), the program will print the most times that number … |
|
Hello, How do I send a class (that extends from JFrame) back and forth between Client and Server? I would grateful for any pseudocode. Thank you! |
|
Could you please show me a very small program with the explanation how the data can be passed between classes. I said very small program (as small as you can) because I just started in Java and if the program is big I'll get lost !!! I'm a bit confused … |
|
|
So my teacher gets mad at me when I ask questions so I'm coming here for your help cause you guys a life savers :) OK So what I understand about this project is we have a file with numbers and we have to make an array to read it. … |
Here is my code: [url]http://pastebin.com/KTR86nzD[/url] This is input.csv: name,age Fred,88 Stella,11 Nellie,99 George,22 Violet,33 Rose,77 Bob,66 Lena,55 Billy,44 It should print the above in this format - Fred is 88 years old Stella is 11 years old Nellie is 99 years old ... Billy is 44 years old. Afterwards, it … |
|
I do not want to have my box this wide. I would like the text to wrap but I do not know how. Can I do this? I'd like my box to be 400,400 rather than 1250,200, but it is the only way I can get my text to fit. … |
|
How in Java SE and EE(Web), I may program in a form, a drop down menu and same time itself be a textbox user can type in? |
|
Okay so in class my professor was going over this code: [CODE]class BinaryTreeNode<T> { protected T element; protected BinaryTreeNode <T> left, right; BinaryTreeNode (T obj) { element = obj; left = null; right = null; } // constructor BinaryTreeNode public int numChildren() { int children = 0; if (left != … |
|
Hi folks I know this particular program has been posted in many other forums but it all involves many different things that I have no learned yet so I really can't use any of them.....plus it would make me look stupid to turn in something that I copied that includes … |
|
The problem states to write a method named fallingDistance that accepts an object's falling time as an argument. The method should return the distance that the object has fallen during the time interval. Demonstrate the method by calling it in a loop that passes the values 1-10 as arguments and … |