31,001 Topics
| |
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 … | |
write java a program that finds the longest substring without repeating characters in a string | |
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 … | |
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 … | |
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 … | |
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 | |
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 … | |
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)) { … | |
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() { … | |
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 … | |
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 … | |
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 … | |
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.. | |
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 … | |
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 … | |
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) … | |
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] … | |
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 … | |
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 … | |
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 … | |
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 … | |
// 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 … | |
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 … | |
// 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 ===>> … | |
# 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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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. |
The End.