32,199 Topics

Member Avatar for
Member Avatar for jalpesh_007

Dear all, I have declared following two hashmap. `public static HashMap<Integer,String[]> m1 = new HashMap<Integer,String[]>();` `public static HashMap<Integer,String[]> temp = new HashMap<Integer,String[]>();` At starting point of my execution both map will contain key from 1 to 20 and mapped value with it. Means key value pair are same in both …

Member Avatar for NormR1
0
355
Member Avatar for s1lkman

import java.util.*; public class MyLinkedList { private Node head; private class Node { private String element; Node link; } public MyLinkedList() { head=null; } public void insertAtHead(String ele) { Node curr = new Node(); curr.element = ele; curr.link = head; head=curr; } public void insertAtTail(String ele) { Node curr = …

Member Avatar for Taywin
0
117
Member Avatar for Yarra

How do I graph a parabola using an equation where the user can just input an angle and velocity. And is it possible to have an object follow this path?

Member Avatar for Taywin
0
107
Member Avatar for caswimmer2011

Hey, I am trying to use a for loop inside a recusive method, but everytime the method runs recursively, the integer in the for loop resets to zero because of the initialization. Is there anyway to keep the integer counting up, and not resetting to zero? Thanks in advanced!

Member Avatar for Taywin
0
141
Member Avatar for regina.elmose

I apparently can't figure out what I am doing wrong....I have been reading all day and googling help but it hasn't helped. Here's what I have... public static void main(String[] args) { ArrayList<Animal> animalCensus = new ArrayList<Animal>(); Scanner input = new Scanner(System.in); //int uniqAnimal = 0; //String animalName; String endList; …

Member Avatar for Taywin
0
557
Member Avatar for Hemanth.Satkuri

Help me in constructing a MySql Query to retrieve the rows based on datetime column. Below are the conditions: 1)The date difference between today and date in that column sholud be =>2 days. 2)If the day of the date in DB column is Thursday/ Friday then the date difference between …

Member Avatar for Taywin
0
85
Member Avatar for Hemanth.Satkuri

I have a Date Picker code. Can you help me in constructing the Time Picker . Or can you suggest me some websites/materials to refer Thx in Advance

Member Avatar for NormR1
0
126
Member Avatar for khalidshakar

** Please Help. When I call this class, it causes the program to stop responding? Actually I used a button must be clicked to start call the class in another class to run it. after I press that button it causes the program GUI to stop responding. I am developing …

Member Avatar for JamesCherrill
0
3K
Member Avatar for ssfox

Hello everyone, Im new in web development, Im using localhost (XAMMP),I'm trying to make my website which basically allows users to compile and run their submitted java program on my server(my web page).Essentially, I want when the users click a button(upload) they upload file from file source(e.g desktop or anywhere …

Member Avatar for ssfox
0
147
Member Avatar for riahc3

I was going to start Apache/Tomcat as root but Ive rethought it and have gone against it. How can I make my web service read/write from "/"? I keep getting permission denied exceptions...

Member Avatar for riahc3
0
190
Member Avatar for shibu111

null pointer exception in jdbc how to over come this problem why this null pointer exception is comming in jdbc.......

Member Avatar for NormR1
0
36
Member Avatar for gajoline.marascino

class ThreeException extends Exception { /** * */ private static final long serialVersionUID = 1L; static int count = 0; public static void main(String[] args) { while(true){ try{ if(count++ == 0) throw new ThreeException(); System.out.println("No Exception"); } catch(ThreeException e){ System.err.println("Three Exception"); } finally { System.err.println("In finally clause"); if(count == 2) …

Member Avatar for gajoline.marascino
0
158
Member Avatar for vaibhav1983

Hi All, I have configured a spring JPA project but when I deploy and start the tomcat I get the exception nin stacktrace as shown below. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/database-config.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are: …

Member Avatar for vaibhav1983
0
378
Member Avatar for subrat_p

I want to do a project on hotel management. But I can not know how to take the print of the bill of a customer. After I entered data in textfield how to take printout those data in a money receipt format.

Member Avatar for subrat_p
0
119
Member Avatar for Kunal Lakhani

I have created an application using swing. On clicking a particular menu item, a form is loaded,and after saving it a pdf generates. For reporting, i am using iReport. Here is the code snippet MyiReportViewer.java package sms.ui.ireport; import java.awt.BorderLayout; import java.awt.Container; import java.io.InputStream; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import …

Member Avatar for Taywin
0
316
Member Avatar for akosivivas

Supposed i will input a string like "java"but the display will change instead of "java" the display will change every character and become **** please help.. :)

Member Avatar for akosivivas
0
83
Member Avatar for anglwthnati2de

Hi I have this code that performs error checking on initial values. Everythinbg works good but how would I go about allowing for user input? I am thinkging JOptionPane but where would I add that? public class Date { private final int month; private final int day; private final int …

Member Avatar for anglwthnati2de
0
343
Member Avatar for mcddewitt

Hello I am having trouble converting a long (cents) into currency format. My Code: l long doublePayment = 1099; //Should equal $10.99 DecimalFormat dFormat = new DecimalFormat(); String formattedString = dFormat.format(doublePayment); System.out.println(formattedString); Output: 1,099 I also tried: long doublePayment = 1099; NumberFormat n = NumberFormat.getCurrencyInstance(Locale.US); String s = n.format(doublePayment); System.out.println(s); …

Member Avatar for JamesCherrill
0
171
Member Avatar for london-G

Hi, I don't know what happen all a suden but all my textfiels variable are now underline in red. I have : st.setString(1, t1.getText()); st.setString(2, t2.getText()); st.setString(3, t3.getText()); Where t1,t2 and t3 are my textfields variable name but is says cannot find symbol. Everything was working fine, I don't understand …

Member Avatar for JamesCherrill
0
103
Member Avatar for xixi.li.7

I need a help with this Java project. And please note that Iam not try to cheating to complete this project,my teacher is give the permission to use any source to help do this project and I'm not plagiarism I will give the credit to the source code in this …

Member Avatar for JamesCherrill
0
91
Member Avatar for oded.taizi

hello, i have this code $divToSubjectShow = "<div id='subjC".$subId."'><div class='boxC'>".$subName."<span onclick='delTempSubject(subjC".$subId.")'>X</span></div></div>"; to store in div innerHTML with js and i get this error > missing ) after argument list any idea?

Member Avatar for pritaeas
0
29
Member Avatar for jalpesh_007

Dear all, I have stuck with one problem. I have taken one Hashmap, Performing some input operation,remove operation on it. So after performing remove operation, i want value of 2 successive key in two different array. Also i want to match 1st key's value with all other keys' value. Like …

Member Avatar for JamesCherrill
-1
1K
Member Avatar for poojavb

Is there a way to set Max date in Java for the calendar control or restrict the user from selecting the future dates?

Member Avatar for JamesCherrill
0
199
Member Avatar for Alsobhi

Hello I'm new learner in java, and I'm facing a problem to develop a Java application that will ask the user for the time in terms of hour and minutes and display the time by drawing a clock. I have created two classes, and the code is below. Please could …

Member Avatar for NormR1
0
500
Member Avatar for fariajan.siddiqui

hey iam writing this code in button's actionPerformed but it doesn't displaying any image . Can you identify what is problem in it??? JFileChooser chooser = new JFileChooser(); FileNameExtensionFilter filter = new FileNameExtensionFilter("Images","jpeg", "jpg", "JPG", "JPEG", "gif","GIF", "png","PNG"); chooser.setFileFilter(filter); if (chooser.showOpenDialog(this)== JFileChooser.APPROVE_OPTION) { File file = chooser.getSelectedFile(); ImageIcon icon = …

Member Avatar for JamesCherrill
0
105
Member Avatar for Fedhell

Hey guys, its been quite a while since ive posted here :-( Im making a game in java (nope not for school, just for fun) Anyway, ive created some logic for an enemySuicideBomber(spaceship game, prolly not what your thinking) to select the closest location. It works for the most part, …

Member Avatar for NormR1
0
218
Member Avatar for jyotikalra14

i want mini project on online share trading in advance java........please help me that how i can made?

Member Avatar for JamesCherrill
0
29
Member Avatar for System Networks

When I write in my terminal, java -jar myJar.jar, it gives me an error "Resource Not found res/playNow.png" When I run it in eclipse, it does not give me any errors about this image. My folder in my eclipse is outside my package called res and inside it are images. …

Member Avatar for NormR1
0
258
Member Avatar for kovidd

I and my friend are starting aur project based on java . We are planning to create a java based forum software . But we are confused to wheather make it a app on windows communicating a DB server ...Or to make it based on serverlets/jsp etc (somthing like vbulltein …

Member Avatar for ~s.o.s~
0
223
Member Avatar for System Networks

How do I access My jar in the mac os terminal. I have a jar in my desc top called System FRONT.jar First, I put `cd desktop` then i put java -jar System FRONT.jar It says unable to access jarfile system Then I tried another jar which does not exist, …

Member Avatar for ~s.o.s~
0
674

The End.