32,204 Topics

Member Avatar for
Member Avatar for rayden150

I was wondering if you could give me advice, do i need to be extremely focused? also what do i start with, where do i start?

Member Avatar for stultuske
0
254
Member Avatar for kulith

hi im new to java.i wrote a simple programme and need a little help.i should enter an int as the input but when i entere a string, it gives an exception. Exception in thread "main" java.lang.NumberFormatException: For input string: i need a dialog box to be appeared when i enter …

Member Avatar for stultuske
0
306
Member Avatar for harshd89

Hello, We were assigned a hw to come up with a linked list implementation for grades. We are supposed to ask the user how many students there are and then ask for 4 grades for each student and then come up with an avg in 2 different ways i.e sum/4 …

Member Avatar for |-|x
0
4K
Member Avatar for Stuugie

Hi All, I am attempting to execute a dtsx package using Java and I have the following line Process executionProcess = Runtime.getRuntime().exec("dtexec/f\"C:\\Projects\\EconAnalysisConferenceBoard\\EconAnalysisConferenceBoard\\EconAnalysisConferenceBoard\\ConferenceBoardETL.dtsx\""); I keep getting an error saying the file cannot be found but if I run the dtexec in command prompt with the exact same paths and file name …

Member Avatar for Stuugie
0
682
Member Avatar for joseph.lyons.754

I have been tryin to get this to work for the past week if not two >:( with no joy. Worst of all its such a trivial problem. The program asks you to choose a town name from a combo box when you choose the location you shoud be brought …

Member Avatar for JamesCherrill
0
424
Member Avatar for upenrhar

How to get current user connected to a Liferay portal with the help of simple Java code ?

Member Avatar for stultuske
0
36
Member Avatar for greyfox32

I am working on a program which takes a text file as input and stores each word in a hash table along with a count of how many times the word occurs in the text. It seems to work fine until I attempt a file with more than 18 words, …

Member Avatar for bguild
0
259
Member Avatar for game06

I am making a string array so user can type whatever they want. the problem the code i have below user can enter &, alt, up, @, in string array. I want user to enter letters and numbers only, and 1st char has to be letter. I couldnt find any …

Member Avatar for stultuske
0
123
Member Avatar for devanshee

import java.io.*; public class t1 { public static void main(String a[]) { int i; char c='a'; char[] ch={'a','b','c'}; for(i=0;i<3;i++){ System.out.println(ch[i]+" "); } //String s=c.toString(); //char cant be dereferenced String s=ch.toString(); System.out.println(" S : "+s); } } Q-1) I am getting an error while converting a character array to String aoject. …

Member Avatar for stultuske
1
165
Member Avatar for chivas12

i wanted my program to show up in a Jframe the code reads the pixel color i want the frame to display red= pixel color blue= pixel color and green= pixel color and how would you make the background color of the frame change according the mouse movement for example …

0
99
Member Avatar for game06

i have two classes. Main class and tester class. I have to create a textfield so your can enter there name. The problem is that in tester class i am getting error on add() method. is there simple fix for this? i want to create the textfield in tester class …

Member Avatar for bguild
0
143
Member Avatar for 9tontruck

Hi, I downloaded CDT 8.0.2 for Indigo and installed it through help->install software. But in right click on project->properties, I can't see C/C++ build option in the properties! What happened!

0
103
Member Avatar for Violet_82

Hi guys, I am not sure this is right or not. If I have one variable whose value is true or false and I want to use it in an if statement I could easily do if(variable1){ //do this and that } but I want to check 2 variables I …

Member Avatar for Violet_82
0
190
Member Avatar for Gruff

Alright so I am still kinda new to java I am working on a lottery program that will ask the user how many tickets they would like (default being five) and each ticket has a random set of numbers plus a jackpot number: this is the code have so far... …

Member Avatar for JamesCherrill
0
132
Member Avatar for kay19

Well i'm having trouble with this code with the following lines: return new AccountID(this); return new Customer(this); ^These two from the clone method. Customer myCustomer = new Customer(newBank.Find(myAccountID)); ^Not sure what i'm doing wrong here, it is on 4 different methods of deposit, withdrawal etc. Not only that, but my …

Member Avatar for kay19
0
208
Member Avatar for peymankop

Hi...! i wan to write a program that when i give it a number and a string it replace string with length=number to "1,2...,n" but its replace part doesn't work! this is the code: package fasle5; import java.util.Scanner; public class Tamrine8 { public static void main(String args[]){ System.out.println("Enter N:"); Scanner …

Member Avatar for JamesCherrill
0
200
Member Avatar for moha_1990

hey guys this is the question compile shuffleUniqueRandomNumbers.c and run the exe file to generate n number of random numbers. The program asks for three (3) parameters: generated number, lower bound and output file name. For example if you input 100 as generated number, the program will generate 100 numbers …

Member Avatar for jwenting
0
233
Member Avatar for codys21

I am getting an error when I run my program that says: Exception in thread "main" java.lang.NullPointerException at defaultpackage.GradeBook.setName(GradeBook.java:25) at defaultpackage.GradeBookDemo.readFromFile(GradeBookDemo.java:52) at defaultpackage.GradeBookDemo.main(GradeBookDemo.java:23) I've looked through my program and cannot figure out what is actually wrong. The first class is GradeBook and the second is GradeBookDemo. I have to use …

Member Avatar for bguild
0
499
Member Avatar for Translucentbill

How would I make an Image work like a button? I need it for a yahtzee game. I want it so that after i roll the die and the image is displayed i want to be able to select the die i wish to keep and then re-roll the ones …

Member Avatar for goodtaste
0
1K
Member Avatar for Violet_82

Hi, when I started to look into programming, one of the things I remember many programmers are quite keen on are setters and getters. I totally understand the importance of them but there is one thing that isn't really clear to me. If I have a class with some private …

Member Avatar for Violet_82
0
172
Member Avatar for Violet_82

Chaps, I am having some problems with a return statement in a function. I have this situation: public boolean isFine(){ for( int i = 0; i < myarray.length; i++ ){ for(int j = 0; j < myarray[i].length; j++ ){ if( myarray[i][j] == myEnumeration.FRIDAY ){ return false; } else{ return true; …

Member Avatar for Violet_82
0
168
Member Avatar for jared.j.roberts.7

Hiya, I am new to java, I have a very fast paced class and I am learning as much as I can as quickly as I can. I have previous experince with C++ but it will not help here. My Question: **WHY WILL MY PROGRAM NOT RUN!!??** *It compiles and …

Member Avatar for radhakrishna.p
0
185
Member Avatar for Violet_82

Chaps, sorry I have a silly question. I am not quite sure if this is right, but what is the differenct between the two below: public class myclass{ public static void main( String args[] ){ boolean variable1 = false; boolean variable2 = false; ... System.out.print(variable1 + " and " + …

Member Avatar for Violet_82
0
179
Member Avatar for joseph.lyons.754

Hey Guys, I am working on a search that takes in a value via textfield. Once taken in it should display another Jframe with the info but the searchbox crashes the second I run it. Its some stupid mistake I have made or i have gone about it the wrong …

Member Avatar for JamesCherrill
0
376
Member Avatar for sainaleni.guttula

`**when we write a program in java main() will be executed first why?**`

Member Avatar for stultuske
0
91
Member Avatar for newGains

i created a testScores class which initialized an object with an array of scores and had an exception that if the score was <0 or >100 it would throw an IllegalArguementException. I got my main program to work it throws the exception for the array with the bad grade in …

Member Avatar for JamesCherrill
0
301
Member Avatar for JustLeftRavenholm

/** Saadman's ISU **/ import java.io.*; import java.util.*; public class ISU { public static void main (String[]args) { //Keyboard Initialization Scanner kbin = new Scanner(System.in); //Variable Inititialization & Declaration; String list[] = new String [21]; int price1 = 30; int price2 = 20; int price3 = 25; int price4 = …

Member Avatar for stultuske
0
217
Member Avatar for ganges

Hi, help me to configure (hibernate + mysql + xml) in eclipse, I am getting errors while following the sites when i got them in google seach thanks for your time

Member Avatar for <M/>
0
80
Member Avatar for tingwong

Hi I am working on a project on writing our own huffman coding. I am currently having trouble writing the binary 1's and 0's to an output file. It works with smaller input files but for very large files it does not write anything out to the output file. The …

Member Avatar for Schol-R-LEA
0
1K
Member Avatar for game06

i am trying to make a breakout game where you have a paddle and ball bounces around breaking bricks. the problem is that if ball touches the corner of player(cyan paddle). than it goes inside of player. i could not understand why. only thing it might be bc of all …

Member Avatar for JamesCherrill
0
113

The End.