31,001 Topics

Member Avatar for
Member Avatar for Badulla

i have wrote this program which uses binary search to search for a desired word and which displays the word along with the meaning of that particular word.but each time i print the data that the arraylist contains it just print the word being search but not the meaning of …

Member Avatar for JamesCherrill
0
363
Member Avatar for bea_1

write java a program that finds the longest substring without repeating characters in a string

Member Avatar for JamesCherrill
0
229
Member Avatar for Mirty

I need instructions on implementing a houghes circle code using android studio to an app. I do not know where to put everything and need detailed instructions on how to create the app and save it onto an android device. iCannyUpperThreshold = 100; iMinRadius = 20; iMaxRadius = 400; iAccumulator …

Member Avatar for Rajan_7
0
259
Member Avatar for aditya_23

cd D:/ #Extract Author information java -jar svn-migration-scripts.jar authors $SVNURL > authors.txt #Clone the SVN Repo git svn clone --stdlayout --authors-file=authors.txt $SVNURL SVNAsGIT #Clean the new GIT repository java -Dfile.encoding=utf-8 -jar svn-migration-scripts.jar clean-git --force #Update the authors file git config svn.authorsfile authors.txt> #Clean the new GIT repository java -Dfile.encoding=utf-8 -jar …

Member Avatar for aditya_23
0
992
Member Avatar for Doogledude123

A couple questions before I even attempt this project... Is it possible to create a VoIP application in Java? Is it posssibe to do this using standard libraries? If you can't make one with standard libraries, which libraries are needed to accomplish this? Also, is this a good Introduction to …

Member Avatar for Nagy
0
1K
Member Avatar for Julius_4

Hey, my problem is that i got the progressbar and everything i tried was unsuccessfully. The Color is always that orange and i dont get it away. I rly need help woule be nice if i get a fast answer. Regards, Julius

Member Avatar for Chien-Rouge
0
818
Member Avatar for john44

I already wrote an ATM program which did store only three account number, password and balance but now I want to get these information from a file which would be read to the program and by entering the information the program should search the file and find the line that …

Member Avatar for yash_8
2
1K
Member Avatar for stephen_23

Is there any better way to find the duplicate words count in a file using Java. I have found one solution using Map like below : while ((line = br.readLine()) != null) { StringTokenizer st = new StringTokenizer(line, " "); while (st.hasMoreTokens()) { String tmp = st.nextToken().toLowerCase(); if (map.containsKey(tmp)) { …

Member Avatar for rproffitt
0
207
Member Avatar for peter20

Hi all, I have a class CAR.java public class CAR { private int ID; private String model; public CAR(int ID, String model) { this.ID = ID; this.model = model; } public int getID() { return ID; } public void setID(int ID) { this.ID = ID; } public int getmodel() { …

Member Avatar for peter20
0
301
Member Avatar for Varunkrishna

What is the mistake in this code, I am able to print the total digits of the input number, but when I try to print the *actual number* from the scanner it always prints zero(0). For example the user enters **123456** as the input, and my program is correctly returning …

Member Avatar for Prabhat_4
0
1K
Member Avatar for Violet_82

Hi guys, I wonder if you can help me. As I’m now doing java development as a profession now, I’ve realized that I’m a little weak when it comes to fix, modify and understand code within large applications, and, needless to say, I need to find a way to get …

Member Avatar for Violet_82
0
413
Member Avatar for Sunil_19

Hi friends, Being new in junit i have onw question that How to test local variable in method using junit test case? Check that below is my method suppose, public void methodToCheckStr(int testVar) { String str=""; if(testVar==5) { str="Success"; } else { str="fail"; } } How to create test case …

Member Avatar for peter_budo
0
3K
Member Avatar for jonathan_20

hello guys, im new to software progrmming, iam more interested in java programming. iam trying to write a code using netbeans, but after finishing compiling th code, then after running it, it says build unsuccesiful, it gives me an error wich i do not understand..

Member Avatar for JamesCherrill
0
117
Member Avatar for Ater Mawut

I have created a black jack app and have got it show both cards but I only want it to show the second card in the hand and keep the first one hidden until its time to show. Here is the code package blackjack; import java.util.Scanner; /* This program is …

Member Avatar for JamesCherrill
0
217
Member Avatar for Start4me

I'm trying to replicate the ray-looking design, just like in the first image. Here's my code: When the user clicks on the button: private class drawInnerShape implements ActionListener{ public void actionPerformed( ActionEvent e){ paintInnerDesign = true; repaint(); } } The following code executes: class DrawArtwork extends JPanel { @Override public …

Member Avatar for JamesCherrill
0
279
Member Avatar for Mudzy

im stuck on a question from the book, java in 2 semesters chapter 7. 2a) write a program that asks the user to input a string, followed by a single character, and then tests whether the string starts with that character. [CODE]public class StringTest { public static void main(String[] args) …

Member Avatar for JamesCherrill
0
15K
Member Avatar for divinity02

hi all I am doing this thread program and when i run it is not giving any output, can someone tell me why no output is shown. public class RelayRaceDemo { public static Thread runner[]; public static void main(String[]args){ RelayRacer rr = new RelayRacer(); ThreadGroup country[] = new ThreadGroup[5]; country[0] …

Member Avatar for JamesCherrill
0
185
Member Avatar for chrisschristou

hello, i just set goal of mastering algorith and i just get started i have an algorhtm for insert sort and i when i write it in c it is not sorting this is the algorith for j D 2 to A_length key = A[j] // Insert A[j] into the …

Member Avatar for rproffitt
0
416
Member Avatar for Reverend Jim

Here's an interesting little scenario. You get challenged to a game of coin toss. Both players pick a sequence of coin toss results (heads or tails). The coin is repeatedly tossed until the sequence for one of the players occurs. The loser pays the winner a dollar. You'd assume that …

Member Avatar for xrjf
0
2K
Member Avatar for murali89

Dear All, I am trying to learn j2ee from the basics. I have written a basic program from my guidance book and when i try to compile it , i get the below error. Please throw some light on it. javac -classpath C:/Program Files (x86)/Apache Software Foundation/Tomcat 7.0/lib/servlet-api.jar:classes:. -d classes …

Member Avatar for murali89
0
375
Member Avatar for Trevor_5

below is the code i have and i am getting an unhandled IOException in the inputstreams: import java.nio.file.*; import java.io.*; import static java.nio.file.AccessMode.*; import static java.nio.file.StandardOpenOption.*; import javax.imageio.ImageIO; import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.util.*; public class FinalProject extends JFrame implements ActionListener { JLabel guess = new JLabel("Guess the …

Member Avatar for JamesCherrill
0
356
Member Avatar for CS_GUY1234

// Also attached to this question is the assignment sheet. Need help pls. import java.util.*; import java.awt.*; import java.applet.*; public class Lab15st extends Applet { private int numBars; // number of bars to be sorted private int barHeight[]; // array of bar heights private int sortDelay; // delay between comparison …

Member Avatar for CS_GUY1234
0
509
Member Avatar for annya

Hello, I not an expert in android coding but I know little bit, that's why I bought this app from a person. Unfortunately the app author was not giving supporting to me that's why Iam posting this issue here. So please help me, my new app was working fine in …

Member Avatar for rproffitt
0
1K
Member Avatar for CS_GUY1234

// FInished isPal but need help with other few. public class Lab14st { public static void main (String args[]) { System.out.println("Lab 14, 80 Point Version"); System.out.println(); System.out.println("The Palindrome Program"); System.out.println(); System.out.println("By: Arjun Desai"); // Substitute your own name here. System.out.println("\n===========================\n"); boolean finished = false; do { System.out.print("Enter a string ===>> …

Member Avatar for rproffitt
0
367
Member Avatar for omprakash_1

# Split a dataset based on an attribute and an attribute value def t_split(x, y, z): l, r = list(), list() for row in z: if row[x] < y: l.append(row) else: r.append(row) return l, r # Calculate the Gini index for a split dataset def gini_index(grp, class_values): gini = 0.0 …

Member Avatar for rproffitt
0
312
Member Avatar for Heather_6

The Canadian Forest Service wants to do a simple simulation of the growth and pruning of forests. Each forest has a name and exactly 10 trees. The trees are planted when they are 1' to 5' tall, and each tree has a individual growth rate of 50%-100% per year. For …

Member Avatar for ignacio.camachoortiz
0
444
Member Avatar for Petrisor

Good day, I have to make a data scraper and after I take the informations I have to get them in a CSV file.This is the original request:For the final java academy test you have to create a small crawler. What do I mean by "crawler"? A crawler it is …

Member Avatar for happygeek
0
398
Member Avatar for George_23

Hi everyone, I've been searching through these forums to find a way to transfer my program output [including the user's input] to a .txt file. The program basically gets the user's name and their choice of ingredients and then prints out a receipt of their order. Below I've attached what …

Member Avatar for JamesCherrill
0
511
Member Avatar for Lena_1

I am new to Java Programming, I need help on this.. Any help would be appreciated. Write a java program that generates a random number between 50 and 100 for a student grade and determines the letter grade of the student. The student grade is determined based on the following …

Member Avatar for Tarek_2
0
369
Member Avatar for Syed Suleman

I have to create a sign up and log in forum in Java . But I have no idea how to do, or what to do I really need help otherwise.

Member Avatar for Tarek_2
0
179

The End.