32,199 Topics

Member Avatar for
Member Avatar for khaled_jawaher

Hi, I have 2 projects opened in eclipse,I have added one of them as a maven dependency to the other.When I enable workspace resolution I am getting an error:Missing artifact myprojectname:jar:1.0.0 and when i disable workspace resolution it is showing some member properties of the class related to the project …

Member Avatar for rproffitt
0
240
Member Avatar for DGULLIVER

Hi, Currently my PC is setup for .Net development using Visual Studio 2012. I'm starting to look at JAVA programming so I was wondering can the JDK and Netbeans/IntelliJ/Android Studio coexisit with my .Net Development environment? I do not want to install the JDK and the either if the IDE's …

Member Avatar for stultuske
0
355
Member Avatar for pauline marie
Member Avatar for letters1417

Hello! I have to print patterns using '*' and I am at a loss how to get these patterns printed! I figured out the first one, * ** *** **** ***** ****** ******* ******** ********* ********** and now i have to do it upside down: ********** ********* ******** ******* ****** …

Member Avatar for JamesCherrill
0
2K
Member Avatar for Stephen_13

I know this is really messy code but I am writing a Paint app in Java for a class and I'm getting an ERROR when I drag the mouse. MousePressed works properly (prints). MouseDragged, however, throws a NullPointerException. Please let me know what the problem is here. I'll put a …

Member Avatar for JamesCherrill
0
421
Member Avatar for Centorpe

I have a series of activities the last of which holds results. I have 'Send to Printer' button which needs to send these results to a wireless printer. Can anyone give me an example of doing this? I''ve trawled the web but there seems to be very little on this …

Member Avatar for rproffitt
0
337
Member Avatar for divinity02

hi i am practicing this program here and i am outputting zero. trying my best where is the error here is the code double fed_tax = 0, state_tax = 0, hrswrk, payrate=0, gross_salary = 0; double hrlyrate=0; System.out.println("hi please enter your first name"); String firstname = userinput.next(); System.out.println("hi please enter …

Member Avatar for JamesCherrill
0
235
Member Avatar for Mar. Na.

Hi ,all.. How can i read more than one java file but ,without repeating the section of bufferedreader in every time i read file!!....so if i have 20 file ...this way is unpractical?? for example: this code: public class buffer{ public static void main(String[]args) throws IOException { String filname1= "C:/filename/filename1"; …

Member Avatar for Mar. Na.
0
270
Member Avatar for mike52john

Hi, i have been working on this program and will display the array contents to the user and ask how many positions he would like to shift off the right side of the array, and replace onto the left side. This is what is supposed to look like: Array contents: …

Member Avatar for rubberman
0
183
Member Avatar for AkshatGupta

I am trying To display the content of the table selected(Imported from MySql) in a JTable whose Structure is unknown to me . I Have Successfully added columns in Jtable but not Able to add rows which the ResultSet Object Returns. Please Help me Insert The Row DATA . I …

Member Avatar for AkshatGupta
0
750
Member Avatar for Gregt1991

I am working on a program that should convert between in, ft, mi, mm, cm, m, and km. The question is: Write a unit conversion program that asks users to identify the unit from which they want to convert and the unit to which they want to convert. Legal units …

Member Avatar for happygeek
0
21K
Member Avatar for Roger_2

the source of the line is provided below, i understand what v.compareTo(w) does but i am curious as to what influence the < 0 has, does it not allow it to return if compareTo returns 1 which is greater than 0? does it not return if anything if compareTo returns …

Member Avatar for rubberman
0
185
Member Avatar for cecsFTL

For this project I need to generate all three digit numbers where the 1st digit is always larger than the 2nd, and the 2nd digit is always larger than the third. I'm not asking you guys to do it for me but to point me in the right direction. I'm …

Member Avatar for JamesCherrill
0
2K
Member Avatar for Mar. Na.

Hi all, how can I write lines that I read from multiple files to one destination file in java?? the method write (FileWriter) can do this When I read multiple files and save these line in string called for example "line" ..how can write line on the distination file? I …

Member Avatar for Mar. Na.
0
571
Member Avatar for freeugh

We're asked to program pig Latin, all works fine except for the counting of occurrences of the string. public static void count(String [] wordperLine, String [] word){ String check=" "; int count=1; for(int i=0; i<=wordperLine.length; i++){ for(int x=0; x>word[i].length(); x++){ for(int z=0; z<=word.length; z++){ if(!word[x].equalsIgnoreCase(check)) { for(int y=0; y<=word[i].length(); y++){ …

Member Avatar for JamesCherrill
0
154
Member Avatar for MWE_QUE

I was working on the wrong assignment, so I hammered this out, it's almost due, and I am having trouble figuring out how to test my program. Eclipse keeps showing errors when trying to figure out how to populate my fields, assuming I have the rest of the program right. …

Member Avatar for blauthor
0
957
Member Avatar for pawanbishnoi

how to create text box dynamically at run time in java and access each textbox value to insert in database.

Member Avatar for JamesCherrill
0
196
Member Avatar for Rohit_24
Member Avatar for Jamie_11

This is what I have so far.....any advise? Output does not give only one largest and smallest number from a file and also there are multiple averages of numbers..... thank you in advance.

Member Avatar for stultuske
0
201
Member Avatar for Ioanna_1

I have a small spout in Storm of 60 integers but when I run the maven project I got the result but also several messages "Error: Stream Closed" like the photo below. What should I do to fix these errors? my terminal: ![Screenshot_from_2016_03_07_19_57_50.png](/attachments/large/4/6e9b2e556e2d91d16d4a7c868c4b3ab3.png "align-center") also when I use a large …

Member Avatar for stultuske
0
251
Member Avatar for sassy_94

Hello, I have an arrayList that I want to emit and receive it in another bolt. So as suggested on another post here I used: the first bolt: collector.emit(new Values(listI)); the next bolt: public void execute(Tuple tuple) { ArrayList<Integer> i = (ArrayList<Integer>)tuple.getValue(0); .... } but instead of a size 4 …

Member Avatar for JamesCherrill
0
299
Member Avatar for james sipha
Member Avatar for Mar. Na.

Hi all, In main program I read file using bufferedreader, and (try, catch), Now this section is repeated in my code , how can I call function to do that ? By passing filepath ..I try it but I don't get any line of file ... How can I get …

Member Avatar for JamesCherrill
0
381
Member Avatar for Natsu123

Hi, I am programming an app and facing a problem now. I want to Update my Database over the GUI from my App via PHP. My Problem is that the app always sends the value of the checkbox even if it is unchecked. I will post my Script below. update.php …

Member Avatar for cereal
0
859
Member Avatar for Hari_11

I have a list of objects that having becode as string(setter,getter),i want to set the ststus as "active" for all the becodes.below is my query.but its giving exceptions as "java.lang.ClassCastException: com.rogers.tpia.model.updatetpia cannot be cast to java.lang.String".pls help me u will get appriciated. public void activateUser(List<updatetpia> act){ Session session = sessionFactory.getCurrentSession(); …

Member Avatar for ihelpyou
0
139
Member Avatar for Mar. Na.

Hi all;;; please can anyone help me , when i opend my java program i wrote it previously ,,,i see the red line in the editor and code dosent exist ????and the error that appear : illegal character: \u000. I am very sad for this because my program ia too …

Member Avatar for rproffitt
0
531
Member Avatar for ericalanso

The eror says: llegal static declaration in inner class Question1.Question1Listener modifier 'static' is only allowed in constant variable declarations ---- /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the …

Member Avatar for JamesCherrill
0
453
Member Avatar for WarriorsFan510

Hey guys. I seem to be having a problem with my code. import java.util.Scanner; public class fishingGames { public static void main(String[] args) { int totalPoints = 0; String items; int Sides = 6; boolean playAgain = true; Scanner keyboard = new Scanner(System.in); Dice = new Dice(Sides); while (playAgain) { …

Member Avatar for stultuske
0
533
Member Avatar for Bradley_1

Hi guys, i have an assignment where i have to create a oop text based java game and have no clue where to start or what i need to include. any tips? thanks

Member Avatar for Bradley_1
0
1K
Member Avatar for AkshatGupta

MAke a quiz in gui which shows the player the time left for a particular question and automatically proceeds to the next question when time limit exceeds. time left to be shown in a jlabel

Member Avatar for Ammar_7
0
5K

The End.