32,199 Topics
| |
So I have this assignment where I am acting as a set. A set that holds numbers. In other words an array I am guessing. So he gave us a generic interface. Then we have to use another class and finish those methods. I'm having trouble because I've never used … | |
when i use border layout and centre alignment, my label content is appearing on left side but i need it on right side, suggest any change here is my code [CODE]import java.awt.*; import javax.swing.*; import java.awt.BorderLayout; class Welcum extends JFrame { Container c; JButton bFd,bAcct; JLabel lWelcome; public Welcome() { … | |
Hey, I've had this question for a while now and forgot to post a thread asking it. I'm really interested in databases and i've been wanting to create a program that recalls information from a database. I've done one that reads a text file but that just seemed...boring to me. … | |
Hi, I am trying to generate javadoc from the file "C:\Program Files\Java\jdk1.6.0_26\src.zip" by using the command "javadoc". But I am not able to do it. How to use that command? | |
How to change the color of selected row of an HTML table without using CSS or Javascript? | |
please some one would explain me why we use Bufferedreader() instead of using InputStreamReader() only. | |
Hello! I write a simple java program. The user will give a URL adres which have some flags. I will parse the URL by this flags. For example the user will give [url]www.exampledomain.com/abc/[/url][[FLAG1]]/abc_[[FLAG2]]gfc I need to parse load to string parsing the URL: String[1]=www.exampledomain.com/abc/ String[2]=/abc_ String[3]=gfc I need to ask … | |
i have a a file Fd.java in which i am trying to call constructor of another class TRrelatn and both the classes are kept in same folder but it is giving error as well as exception that is :\Fd.java:368: cannot find symbol symbol : class TRrelatn location: class FrmAdd new … | |
If have a java program with 4 JTextField. In my JButton add, the event code goes like this: [CODE]add.addActionListener( new ActionListener() { //Handle JButton event if it is clicked public void actionPerformed(ActionEvent event) { try { String add = "insert into person (firstName,middleName,familyName,age) values ('"+inputs[0].getText()+"','"+inputs[1].getText()+"','"+inputs[2].getText()+"',"+inputs[3].getText()+")"; st.execute(add); //Execute the add sql … | |
i am trying to create a project file from existing main files , i create my project file(FixedDeposit) where other files are kept i want to add, and i use the option add existing file and add all the files i want to add. And i make the main of … | |
Hey guys I'm new to java and was wondering if I could have a little assistance. I need to have a user input their number of classes, hours for each class and the grade they received after the information is given i need to calculate their GPA. I have gotten … | |
I have been stuck on this program for MANY DAYS and I really need help. I am a total NOOB! I don't know what more to do. I am far too confused. THIS IS WHAT MY PROGRAM SHOULD OUTPUT: Play the game of Precaution. Try and create as many unique … | |
HI I am new to regex, could anyone help me in finding the java code using regex: My input string is : MyData 68309486 Bob I want to fetch only the digits in sequence like 68309486. PLz help me!!! | |
Hey guys! I am kind of new to Java and am having issues understanding why this code will not run. Any advise would be greatly appreciated! Thanks in advance! [CODE] // Phone.java // Program creates a GUI that resembles a phone with functionality. import java.awt.*; import java.awt.GridLayout; import java.awt.event.*; import … | |
I don't know am i asking right question or not but my question is: I want to create a simple search site so I've team with different jobs. I have its database part to handle. I should create its database and i have not idea what should i do. I'm … | |
So when I compile it says i'm missing an if statement at line 38/39 but im using nested else if's and when I take it out it causes more errors. [CODE]import java.util.*; public class lhlBanking { static final double servicecharge_savings = 10.00; static final double servicecharge_checking = 25.00; static final … | |
Hey guys! I'm new to java, I have to write a program using a linked list, that will prompt a user to enter 10 names, and display them reversed. But is has to be a GUI. Any idea where i can start, or give me some clues, i would really … | |
Hello friends..! I tried to implement HeapSort algorithm in Java. but I've got some problems. First I should say that I have tried to implement the algorithm mentioned in the book "Introduction to Algorithm". the first question is how we can maintain the heap size? The book doesn't help with … | |
Hi hi What would I add to this code in order for it to pick a random word from the txt file? [CODE]try{ RandomAccessFile raf = new RandomAccessFile("Words.txt", "rw"); guessme = ""; while ((guessme = raf.readLine()) !=null){ guessme.toUpperCase(); } }[/CODE] Help is much appreciated! | |
my assignment was to create a calculator using either if statements ir switch methosd i opted for the switch method. everythign compiles but when I type in two integers this is what comes up:Enter two integers to be calculated (separate using space): 2 3 Exception in thread "main" java.lang.NumberFormatException: For … | |
So i had to write a program that uses these functions to add, subtract, multiply and see if the numbers equal each other. and also You must create a way to keep track of the relationships between friends, the spouses, the siblings, the children of the men and women. attached … | |
Hello, I have this code that's giving me some problems: [CODE]import java.util.Scanner; class Bæreevne{ public static void main(String[] args) { int avstand, vektTre, vektBetong; Scanner tastatur = new Scanner(System.in); System.out.print("Oppgi antall meter mellom søylene"); avstand = tastatur.nextInt(); vektTre = 3000 - 20*avstand*avstand; vektBetong = 7000 - 80*avstand*avstand; if (vektTre > … | |
| This is my first GUI program in Java. If finds the day of the week for any given date which is after 1 January 1900. |
I will be interviewed Monday or somewhere along the school week, to take an IB Computer Science course. I told the teacher that the programming class I had was a bit too essay and told her I had experience in C++, C# , VB, and python (basic). But I will … | |
Hi this is my first post, but I've lurked for a while usually finding answers to my questions in other threads, I couldn't find this one so I broke my posting cherry to ask. I know I'm missing something, probably really simple, but possibly I'm doing this completely wrong. I'm … | |
iam building a training set for spam filtering using java,training set data is given as words in text files in one folder,but im unable to debug whats going wrong in java collections [CODE]/* *folder part 1 conatins various text files having name format * **spmsg***.txt and ***legit***.txt e.g 11927legit569.txt ,106127spmsgc26 … | |
Well I just got a new latop with windows 7 and downloaded textpad 5 to do my java homework. At first I had issues just trying to compile but then found out that i needed to point textpad to javac.exe for it to compile. Now my problem is i cant … | |
I have to calculate the number of days between two dates the hard way. I know there is already a way to do this with an existing package and such but I have to do it within a single method "daysBetween" without altering any other part of the code. The … | |
I'm having trouble understanding the binarySearch method in the Arrays class when using an Object array. Is it possible to use this method to search for a specific field within an object in an object array? For example, if my Object array is an array of Person objects, each with … | |
Hi im trying to make a program that passes an array to a method. the method then finds the smallest number in the array and passes that number back to the main where its printed out. I am getting an error saying: "error: number cannot be resolved to a variable". … |
The End.