32,204 Topics
| |
Why must the use of the this keyword, or similarly the use of the super keyword in constructor chaining, be on the first line of an overloaded constructor? In other words, actual class construction cannot be split between constructors. If re-direction must occur, it must be the first line of … | |
Hi, I am new to Java, but have been programming in C++ for a few years now. I am working on a project where I have to write a class to implement a gameboard. To do so, I'm using a 2D array of objects. I have a method that swaps … | |
I'm trying to compare strings in a Linked List and it throws a null pointer exception somewhere in the method smallest() which is where i have the strings(nodes) comparing each other. I've been Trying to find the answer for two days now and I've gotten nowhere. PLEASE HELP! The code … | |
Hi, I am doing a final year project which is about predicting a situation based on given known facts, as a extra feature to my project I would like add a word cloud system to it aswell that would display the predictions in word cloud form to indicate the likelyhood. … | |
I plan to make Java image viewer I just started today and I had hard time with GridBagSizer After long time of pain it turned to be fruitful. Here is what I have so far. I want the following, of which I have failed: 1. Make the components fill the … | |
I have a website that i have uploaded an applet to. In the same dir as the applet, I have uploaded three textfiles that the program uses. The applet works perfectly in the appletviewer runing off of my computer, but when i upload the class online it seems that the … | |
[code] if (a>b || a==2){ System.out.println("yes") } [/code] [quotes] in if command it gives an error, sayin operator || can not be applied to a boolean. I want to know how to use the and &&, or || operations in java.. [\quates] | |
hi, i am developing a mobile application for my company, but i am having some problems storing and retrieving data from my database which is located in my server. Does any one know how i can do it. Using rms will only get the data out from the server stored … | |
hi, i am trying to build a simple program where system asking info (name,age,sex & location) to make a table using do-while loop. for each info will create one new row in table that i dont know how to make.. please help me... here, i made for one single row … | |
Can anyone tell me where I am going wrong with my code? I keep getting two errors stating ';' expected (on lines 22 & 23). I am new to this so I am not sure what I can post and what I can't, so I am just going to post … | |
So the problem comes in, in the last method called printComparisonResults. I just have no clue what to do?? Thanks for your time! My Class: [CODE] //StudentRecord //Nick Elliott 02/01/10 import java.util.Scanner; import java.io.*; // A StudentRecord contains a student's first name and their gpa public class StudentRecord { private … | |
I am developing a code to find the occurence of digits in a string. I need help. When it compiles I get the error: cannot find symbol variable countDigits | |
My assignment: Create a class with a method that accept a charge account number as its argument. The method should determine whether the number is valid by comparing it to the following list of valid charge account numbers: 5658845 4520125 7895122 8777541 8451277 1302850 8080152 4562555 5552012 5050552 7825877 1250255 … | |
Ok, so I need a bit of help on a small project I'm working on. Here's the run down of it: Write a Java program that allows the user to enter tests grades for yourself. The application should prompt the user to enter how many tests they wish to enter … | |
Basically i need to use JOptionPane and have the user enter a name followed by a . (dot) and a file extension. After they have done that the output should be the extension name without the dot. Ex Please enter a file with dot extention > new.html You choose html … | |
Run the program and you'll see I am not filling the arrayList but am invoking the toString method. Obviously this is not giving me the desired output. What's wrong? (I did not post the other classes because I don't think my error is there but if anyone needs them let … | |
Hi, While trying to debug some performance issues, we narrowed down the problem to calls to Entity Beans taking long time. Original design is nice and generic but does not scale up in this case. Here are the details: - J2EE application. - Oracle DB - Entity Beans used for … | |
how to write an application that reads in a five digit integers and determine whether the number is as palindromes or not e.g 12321,11611.If the number is not five digit long, display an error dialog, allow the user to enter a new value. | |
[CODE]public class array{ public static void main(String[] args){ int num[] = {80,20,47,82,25,13}; int l = num.length; int i,j; System.out.print("Given number : "); for (i = 0;i < l;i++ ){ System.out.print(" " + num[i]); } System.out.println("\n"); System.out.print("Accending order number : "); for (i = 0;i < l;i++ ){ //int temp=num[i]; for … | |
hai! i created jar file that will be extractable in any way... but what i need is don't to be extractable... how do seal it from others seeing by extracting it... any general idea please..... | |
I need help with my class assignment. I am supposed to write a java program to count the number of digits in a string using: [icode]public static int countDigits(String s)[/icode] can anyone help...I cant seem to figure it out from what I have [code]public class Ex8_5 { public static void … | |
java program to read csv file and store it in rbnb server please try to help me | |
Alright i am writing a program to read a sentence you write and judging by you punctuation it will tell you whether its a statement, question, exclamation or other. My problem is that it isnt running my If statement. am i just bind and missing something. [CODE]/* * To change … | |
I would like to create a java prob that will request three integers from a users and have it printout the sum and product as such: the 3 different integers are : 13, 27, 14. the sum is 54 The product is 4914 Completed Have i programm the right way: … | |
[CODE] package Sample; public class Sam { public static void main(String[] args) { R obj[] = new R[100]; obj[0].current=0; } } [/CODE] [CODE] public class R { int current; } [/CODE] when executing this code i am getting null pointer exception. while debugging at "obj[0].current=0 " it shows as malformed … | |
hi, i'm having problems with the output. I do not get anything when I select 4 and enter a binary number. Here is my code, if anyone could point out what i'm doing worng, thanks. [CODE]import java.util.Scanner; public class Driver { public static void main(String [] arg) { LineWriter Lw … | |
I have a general question about searching inside a two-dimensional array. I'm working on a number search program that allows the user to enter a number to search in a grid of numbers. For example: User wants to search: 234567 In a grid of: 232772725432 734234657337 272425672442 235533655737 252444474436 737533255325 … | |
Hello, Im trying to create file . I'm almost done my program but Im getting this error. The method read() is undefined for the type Scanner | |
hello please help me i have 2 txtfield then to be inputed first name and last name then after i click the add button the txtfield will clear and when i click the search button it will display on the JTable my problem is that how to put indicator to … | |
If a class doesnt override toString() method and tries to print out the object like this: //some class [code] public class SomeClass1{ int x=4; } //another class class DemoOftoString { public static void main(String[] args) { SomeClass1 o=new SomeClass1(); System.out.println(o); } } [/code] output:SomeClass1@hex version of object's hash code ------------------------------------------ … |
The End.