32,204 Topics

Member Avatar for
Member Avatar for rayan22

double sum = 0; double d; for (d = 0; d < 10; d = d + 0.1 ) { sum = sum + d; } The program has a syntax error because the semicolons in the for loop are in the wrong place. The program has a syntax error …

Member Avatar for Priyanka_9
0
230
Member Avatar for divinity02

I have one question, when you want to add a game round in a java game, how do you do it, do you use the round().method or do you simply put (round++) + 1?

Member Avatar for JamesCherrill
0
361
Member Avatar for moaz.amin.37

hello!I install tomcat server and set CLASSPATH variable `servlet-api` and my servlets running properly but when i compile and run my old program program of `java 2 SE` then it compile successfully but not run it prints an error message G:\Java>javac BinarySearchDemo.java G:\Java>java BinarySearchDemo Error: Could not find or load …

Member Avatar for JamesCherrill
0
230
Member Avatar for Shawn_5

Scanner input = new Scanner(System.in); String secretWord ; String guess, dash = "-", upWord; int numGuesses = 0; int numWord; final String SENTINEL = "!"; System.out.println("Player 2, please look away. Player 1, please enter the secter word: \n"); secretWord = input.next().toUpperCase().trim(); numWord = secretWord.length(); for(int dashNum = 1; dashNum < …

Member Avatar for cool_zephyr
0
148
Member Avatar for My_1

Hello, I have problem with jbotton. I have botton decalre it. but how do i access it ? because I have 10X10 or 100 botton. let i want to access 95 botton how can i do that? how do i set the title? here is code import java.awt.*; import javax.swing.*; …

Member Avatar for JamesCherrill
0
303
Member Avatar for nitin1

I have learnt basic android in the last month. I have learnt about fragments, listview, adapters, acitivties, intents, content providers, databases, animations. I want some basic apps' ideas in which I can implement these things and can improve my learning? I am not too good in Java also. I know …

Member Avatar for Slavi
0
130
Member Avatar for jeram.burbon

I am trying to output how many students were processed, how many of the students had a February 29th birth date and the birthdate of the oldest student. I figured out how to output the first two except how to output the oldest student. is the ckOldestBirthDate and updateoldestBirthDate in …

Member Avatar for stultuske
0
526
Member Avatar for infiniteloop56

Hi guys, I have some what of a quick/dumb question. How would one traverse a binary search tree using a loop instead of recursion (An algorithm would be vwry useful if possible)? I appreciate any help . Thanks

Member Avatar for JamesCherrill
0
5K
Member Avatar for Leo_5

How to rollback the transaction while spring controller has runtime exception... i found some snippet from google i.e, @Transactional(rollBackFor = Exception.class) I think this only applicable for service class has the exception. I need to rollback controller class has any exception. forexample @controller public class test1 { public void testing() …

Member Avatar for cool_zephyr
0
800
Member Avatar for vivekH

Apply undo,redo operations on string pool. please friends help me to get its answer.

Member Avatar for janissantony
0
137
Member Avatar for polar2323

I'm pretty new to Java and I'm taking a class where I need to program an 8-Puzzle Problem in Java. I would love to be able to program it Java in Processing so that I could see the movment of the blocks. I'm generally a vidual learner.

Member Avatar for Taywin
0
196
Member Avatar for redtribal23

I am trying to read a line of numbers in string datatype then parse them into double before reading the next line. I get a nullpointerexception. I am trying to read numbers 4 5 2 first, parse them to double, then do some other calculations before going to the second …

Member Avatar for Taywin
0
189
Member Avatar for Renuka_1

We are hosting the Olympic games. Write a program that will track all the details of this hosting. 1. The program should track the countries and their players along with the games that they are participating in. 2. It will track the medal winners for each game. 3. The program …

Member Avatar for stultuske
-1
160
Member Avatar for GoneGirl

Hi guys, After 10 days of googling and trying I finally must ask. This is not an assignment for school but its a practise one for the upcoming assignment in a few weeks. So i have the weights of 200 oranges in a csv file. With this csv file i …

Member Avatar for GoneGirl
0
2K
Member Avatar for steph7

Hello, so I'm a student and in one of my projects I have to capture the image of a client from a WebCamp and then save it on the database. Now, I'm having some problems and doubts. I've found some videos where they use the library JMF (Java Media Framework), …

Member Avatar for JamesCherrill
1
1K
Member Avatar for shailesh.bhokare
Member Avatar for My_1

How do you via for loop to get the number? I know how the for work. for (int i = 0; i < 256; i++) { System.out.print (i) //That will print out 0 to 255 } how do you read by as byte while (read is not end) { // …

Member Avatar for JamesCherrill
0
74
Member Avatar for Saleem_3

I am looking for Java Webservice Framework that support creation of SOAP as well as REST webservices. I know Apache CXF supports both. Could someone Please suggest more frameworks supporting creation of both type of webservices.

Member Avatar for janissantony
0
81
Member Avatar for N S K

hello friends i am trying to do an virus scanning file(antivirus)..i have spent more times but i cant please any one give me the sample source code i can modify it..i also tried CLAMAV but it is not used for me. thanks in advance...

Member Avatar for janissantony
0
112
Member Avatar for Om Omer

find the distance between two numbers(source and distination)in an array.the array size must be more than 5 and less than 10.

Member Avatar for janissantony
-1
105
Member Avatar for nataraja833

I've have a String String s = " ~ ( A || B ) && C "; A B C can take 0,1,x they follow Boolean Arithmetic w.r.t 'x' Boolean Arith is as follows 0 || x = x 1 || x = 1 x || x =1 x && …

Member Avatar for Taywin
0
346
Member Avatar for mwenyenia07

Hi . I am new to java. I am implementing a functionality where by a user fills some textFields and the data is added as a new row in a Jtable.The table will hold more than one row before saving. I created the table using netbeans Swing controls. its variable …

Member Avatar for JamesCherrill
0
180
Member Avatar for My_1

Hello, I have to subtacke index to number of file that reading in. and then find if there is having a space and counting how many space that have. But my code never excute the if statement. here is code for (int index = -128; index < 128 ; index …

Member Avatar for OldOne
0
118
Member Avatar for ankit1122
Member Avatar for janissantony
0
98
Member Avatar for PcTechnical1

first class GUI - basically trying to use my stack calculation class to use in my first class GUI in my enter postfix expression actionPerformed area? What is the best step to add my stack calculation to evaluate an expression? import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.util.*; import java.util.LinkedList; …

Member Avatar for gusano79
0
199
Member Avatar for COKEDUDE

I was looking at these two examples and I was curious what the difference is between JCheckBox and JCheckBoxMenuItem. http://www.macs.hw.ac.uk/cs/java-swing-guidebook/?name=JMenuBar&page=3 https://docs.oracle.com/javase/tutorial/displayCode.html?code=https://docs.oracle.com/javase/tutorial/uiswing/examples/components/CheckBoxDemoProject/src/components/CheckBoxDemo.java These pictures make it look they are the same except JCheckBox is not in a menu but it is easy to add to a menu with the menu_name.add(menu_item) command. …

Member Avatar for mKorbel
0
348
Member Avatar for EarhawkPH

Hi! Newbie on Java. I'm doing this assignment for a cash register program. Our professor just explained what we're gonna do and stuff. Here's what i understood: 1.)Sales report (my code appears on the first diag box) Product ID Product Name Quantity Price 2 Stuff 100 3 Stuff 100 4 …

Member Avatar for stultuske
0
360
Member Avatar for ali11

import java.util.ArrayList; import javax.swing.JOptionPane; public class ClientList { private ArrayList<Client> clientData; private final String NEW_LINE = "\n"; private int cursor; //manager mode public ClientList ( ) { clientData = new ArrayList<Client> ( ); buildClientList ( ); if (clientData.size ( ) != 0) cursor = 0; //not empty, place cursor at …

Member Avatar for Slavi
0
181
Member Avatar for chubbyy.putto

I try to it. it still have junk char on it. The thing I try to do is decrypt byte key that w/o using the key. When i test is show me a junk when this code is detele any char that over the 0 to 127 but it not …

Member Avatar for Slavi
0
289
Member Avatar for COKEDUDE

I am having issue with jmenu popup in netbeans. It only sometimes works. Sometimes I don't get a java popup at all. Sometimes my File and Edit options are completely missing. This is what my code looks like. import javax.swing.*; public class menu { /** * @param args the command …

Member Avatar for Slavi
0
123

The End.