32,204 Topics

Member Avatar for
Member Avatar for mark185

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 …

Member Avatar for mark185
0
137
Member Avatar for Gadgetman_53

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 …

Member Avatar for Gadgetman_53
0
282
Member Avatar for soteri0s

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 …

0
237
Member Avatar for hafizullah

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. …

0
83
Member Avatar for Stefano Mtangoo

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 …

Member Avatar for Stefano Mtangoo
0
85
Member Avatar for david cashin

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 …

Member Avatar for kvprajapati
0
144
Member Avatar for itsmeisuru

[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]

Member Avatar for staneja
0
134
Member Avatar for pavansathar

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 …

Member Avatar for pavansathar
0
105
Member Avatar for doha786

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 …

Member Avatar for javaAddict
0
461
Member Avatar for Rmj001

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 …

Member Avatar for Rmj001
0
336
Member Avatar for nicklbmx

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 …

Member Avatar for apegram
0
167
Member Avatar for akonful

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

Member Avatar for apegram
0
188
Member Avatar for xxunknown321

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 …

Member Avatar for xxunknown321
0
369
Member Avatar for Bemani_lover

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 …

Member Avatar for peter_budo
0
142
Member Avatar for Austinjs0102

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 …

Member Avatar for mohammedsohaib
0
228
Member Avatar for rwildman23

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 …

Member Avatar for javaAddict
0
104
Member Avatar for thekashyap

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 …

Member Avatar for jwenting
0
182
Member Avatar for ricss_madara

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.

Member Avatar for jwenting
0
110
Member Avatar for java..

[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 …

Member Avatar for staneja
0
188
Member Avatar for musthafa.aj

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.....

Member Avatar for jwenting
0
127
Member Avatar for akonful

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 …

Member Avatar for BestJewSinceJC
0
96
Member Avatar for deepu.bhanu
Member Avatar for javaAddict
0
147
Member Avatar for Austinjs0102

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 …

Member Avatar for staneja
0
281
Member Avatar for mseck

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: …

Member Avatar for staneja
0
100
Member Avatar for shiv0013

[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 …

Member Avatar for PersonalIT
0
1K
Member Avatar for losh177

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 …

Member Avatar for losh177
0
109
Member Avatar for deftech69

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 …

Member Avatar for deftech69
0
2K
Member Avatar for selenask

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

Member Avatar for selenask
0
90
Member Avatar for jemz

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 …

0
56
Member Avatar for fardoonmuhafiz

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 ------------------------------------------ …

Member Avatar for fardoonmuhafiz
0
97

The End.