35,618 Topics

Member Avatar for
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
273
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
185
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
754
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
189
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
585
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
155
Member Avatar for giri.b

Hi this is giri i need ur help that is i am trying to select two drop down option in html and i want compare to options if those options are equal than it as two redirect to respective page ,will u please provide with a code . thank you

Member Avatar for gentlemedia
-1
276
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
198
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
202
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
252
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
301
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
387
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
861
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
142
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
536
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
464
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
536
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
Member Avatar for timtim1

Am currently interested in delivering user experiance web and mobile applications.There are several amazing libraries so far.What are some of the best libraries that I should start with in this journey?

Member Avatar for AleMonteiro
0
153
Member Avatar for Hari_11

i want to search with name,email,id based on that suppose if they enter id then i need to serch with name or if they enter email i need to serch with mail or i want to serch with these 3 fields. so pls give a suggesion for best search query …

Member Avatar for stultuske
0
171
Member Avatar for cproger

I am trying to create a banking system which can state if the user has selected the SavingJRadioButton or the CheckingJRadioButton. Before using getters and setters, I used public static variables which worked, but my teacher wants getters and setters. So far my code looks like this: public class CreateAccount …

Member Avatar for JamesCherrill
0
157
Member Avatar for pihuu

I encountered a problem when trying to use hibernate to save details onto my database. > > SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". > > SLF4J: Defaulting to no-operation (NOP) logger implementation > > SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. > > Exception in thread "main" org.hibernate.HibernateException: /hibernate.cfg.xml not found …

0
195
Member Avatar for Mar. Na.

Hi all,, how can i ignore the comment statements that begin with "/* " and ends with " * / " for example: /* the class is*/ or /* problem is very difficult */ i want to remove these statement when i reading java file line by line package filename1; …

Member Avatar for Mar. Na.
0
1K
Member Avatar for J_2

So I have to Create a Program where the Code Reads the CSV File (csv file consists of FirstName, lastName, ID,Mark). Then after it should sort it by it self and then print how much it takes to execute the program using hte Seleciton Sort method and the Collection.sort. When …

Member Avatar for JamesCherrill
0
311

The End.