36,051 Topics
![]() | |
Hi all master is posible srcape a web java applet using curl php? please help | |
Dear All, I have an animal class and a thread class. Just to understamd the concept of Object lock in threads. I have used the Animal instance as a lock in my thread class. The program never ends. My question is is there a condition i can put before invoking … | |
Hello, I am writng a simple networking program with a single server and multiple clients. I would like to send and receive objects between the clients and the server and hence I use the ObjectOutputStream/writeObject(Object) and ObjectInputStream/readObject() combination. First, my server program: import java.net.*; import java.io.*; import java.awt.*; import java.awt.event.*; … | |
Is it possible to put a checkbox in the title bar of JInternalFrame? | |
What are some simple games that can be made using linked lists and only java? The simpler, the better | |
Since some of us might get a bit rusty with our coding, we constantly need projects to keep us busy, no matter how big or small. Making sure you code a little a day it not only fun but also allows your skills to continue growning. The problem though, is … | |
Hello, DaniWeb! Today I am in need of a Java Crash Course! Maybe a couple of (very short) source files with comments describing what things do? Any help is appriciated! I already know C++, how much does that help me? | |
what iam trying to do is get field parameter and run mysql query to update(decrement) value from field quantity, can any one tell me how to do that? <form method="post"> <table class="bordered"> <thead> <tr> <th>No</th> <th>Drug Name</th> <th>Strength</th> <th>Quantity</th> <th>Dis Qty</th> </tr> </thead> <% try { String query="select * from … | |
Hey everyone, I am learning recursion in Java and I have a lab to do. I have done the first part right, which is to draw those squares. The second part of it is to do the reverse of it, so left starts from the smallest square to biggest. I … | |
I have the following list of Integers (0,1,2,3) Now I want to write a method which returns specific number of pairs from the list. So if I give it 5 as argument I will expect it to return the following: (0,1),(1,2),(2,3),(3,0),(0,1) So basically when it reaches the end element and … | |
My eclipse id is taking too long time to open (at least 15 minutes) I tryed all the options in google search but the problem remains the same kindly give me tips to fix the problem thanks for your time | |
// random number generator var theDecimal = 0; function newProblem(){ theDecimal = Math.floor(Math.random()*256); //math.floor chops off decimals and rounds document.getElementById("startNumber").innerHTML = theDecimal; } | |
As a beginner java learner, I would be grateful if some people could point out a few open source projects with a high quality code base. Not necceserily aimed at a beginner, I would rather see a professional quality example, and preferabbly the project would use some common tools for … | |
![]() | I have already seen that someone posted this question a couple of years ago. I do not want any one to flat out give me the answer. I hav the code written, I just cannot figure out why the pattern won't look like this: 1 12 123 1234 12345 123456 … |
I have a login jsp page where users can login in to my web application, I have also a sign Up form where user can register if they are not members. I'm trying to do the login and sign up forms in one JSP called login.jsp. Login part works fine … | |
see this images what is incorrect in this examples ....... | |
Guys visit this site and please let me know what are the disadvantages of this website ....i am the new user..... **www.bjavaexpert.com** | |
I had a programme to write for college in Java. I have missed the class so I won't be getting marked on it but wanted to get it done as I have an exam next we. I am really stuck. I have to create a costInsurance () method taking in … | |
Hi All, I came across this question in Cathy Siera SCJP book and the answer is really Strange and i dont understand. The question is below. class A { } class B extends A { } public class Comingthru { static String s ="-"; public static void main(String[] args) { … | |
Having issues with array. Seems to pull in the enum files (month and average rainfall) and print accordingly. Also seems to read in the updated rainfall per month. However, problem is I can not make updated print with the enum. Also, last line in program has ..."actual[i]". If use a … | |
how do i change the background to a custom one. code JButton button = new JButton(); JButton quit = new JButton(); public Mainmenu() { Icon b = new ImageIcon(getClass().getResource("play.jpg")); play = new JButton(playb); add(button,BorderLayout.CENTER); Icon quitb = new ImageIcon(getClass().getResource("quit.jpg")); quit = new JButton(quitb); add(quit,BorderLayout.SOUTH); button.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent … | |
I just started learning Java and I have been playing around with it. I am trying to make this program return a double value like 1000/3 = 333.33333..... but it returns 333.000 what am I doing wrong in Java. It works in C though :P. Thanks in Advance! //Exercise : … | |
public class arraChange { public static void main(String []args){ int arr [] = {2,3,4,5,6,7,8}; public class arrayCounter { public static void main(String args []){ Random rand = new Random(); int freq[] = new int [7]; considering the above two seperate lines of codes, i just want people to explain to … | |
please help me how to close the window. code: JButton quit = new JButton(); public Mainmenu() { setLayout(new FlowLayout()); Icon quitb = new ImageIcon(getClass().getResource("quit.jpg")); quit = new JButton(quitb); add(quit); quit.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { } }); | |
I am trying to develop the genetic algorithm to solve Traveling Saleman problem and part of my challenge is to generate random tours long enough and write a fitness function to evaluate the cost incurred for each of the random tour. I have attempted to write the following. My objective … | |
For example, How do I use this custom print method to display something in the main method? public static void print(Stack<String> myStack ) { int count = 1, sizeOfStack = myStack.size(); System.out.println("\nYour stack has size: " + myStack.size()); for (String myString : myStack) {System.out.print(count + ". " + myString); if(count!=sizeOfStack) … | |
Hi Dw I've recently created an application in java on this post:www.daniweb.com/software-development/java/threads/458306/how-to-work-with-jpos and now I just want to improve this by enabling a feature of mixing the cash notes when dispensing the required amount. The machine has these bills notes: 10, 20, 50, 100, and 200 so now what I … | |
I'm writing this code for one of my projects. can you please help me with line #6,#7 and #10? I'm not sure if I am writing the code for those correctly. package waffles; import java.util.Scanner; import java.util.Stack; /** * */ public class Waffles { /** * @param args the command … | |
package die.java; import java.util.Random; class DieGame2 { private final int sides; private final Random generator = new Random(); public DieGame2(int s) { sides = s; } public boolean throwDie() { int faceValue = generator.nextInt(sides) + 1; System.out.print(faceValue); return faceValue == 6; } public static void main(String[] args) { DieGame die1 … | |
I have a login jsp page where users can login in to my web application, I have also a sign Up form where user can register if they are not members. I'm trying to do the login and sign up forms in one JSP called login.jsp. Login part works fine … | |
Hi, Is there any java functions are availble to find mostly repeated characters in string ? Thanks | |
Hi. I am very new to hashtable concept. Here is a skeleton of the methods I need to implement; BUT, my biggest question is the inner Entry class. Am I implementing the entry class correctly?Is my constructor correct? Thanks public class HashTable<K, V> { /** define an inner class to … | |
Hello everybody i have a little problem with making a java command for program i have some code but i do not know how to continue i stuck in one place BTW the command i want to make is > /sendcash [username] [money] // how it looks like I have … | |
Basically I've created an **app drawer** and placed a **seekbar** within it. This app drawer is made up from **app_drawer.xml** whilst my fragment below is made up from **main_activity.xml**. The issue I'm having is, although the seekbar shows up perfectly and the app drawer pulls in and out as it … | |
I a software engineering student who took a Java course last semseter.But currenlty I'm self-studying Java for expanding my Java knowledge.The problem is that Java is a very vast programming language and I'm confused where to head next. I would say I'm on the intermediate level with regards to Java; … | |
Trtying to figure out how to add 5 different methods into this class when the program already does all that is required but my prof will knock me if I dont put them in here, do thet need to be put in as private? | |
i need good java eclipse tutorial iv'e watched theCherno,Thenewboston etc.i learned GUI,anonymousclass etc.i just need a good beginner tutorial on java eclipse. | |
Hello. I am working on this project and it asks me to make two columns of words that are ascending in one column and descending in the other. This is the Project: Call both your project and class AscendDescend. The first column should be in ascending order and the second … | |
i want code of Sorting techniques like insertion sort , merge sort , bubble sort , quick sort. i want their output in gui or in any animation form in any language like c , c# or java. can any one help me plz ?Any one sorting technique is ok. | |
pls help me to build an applet form merge sort for our project | |
Hi, I am trying to read a html page and convert into xml and copy the content into a txt file in the local drive. The code below is to read the html page: def cleaner = new HtmlCleaner() def node = cleaner.clean(address) // Convert from HTML to XML def … | |
Hi Im new to learning java so far ive picked up the basics of it but now im trying to create a first and best fit algorithm for the purpose of memory managment now my question is what to i specifcally need to learn to be able to to this … | |
Hi, I'm trying to use the replace() method to take out all instances of " " , (space) with an underscore, ("_"). I'm doing this because I'm using URLs to connect to a servlet. I keep getting this error: [code] replace(char,char) in java.lang.String cannot be applied to (java.lang.String,java.lang.String) url.replace(" ", … | |
how to upload and display profile picture using jsp and servelet. | |
Hi All, i am here with a problem in file handling in java. i need to search all the files on system with extention *.fdr. which are not less den one day old. then i need to convert the selected file to csv which is perfomed by a command in … | |
Hi guys Can anybody tell me what is wrong with this code? When I select the contractor number (with only one script code)it loads the details, but when I add the second function to load the farmer details, non now works!!!!! What am I doing wrong code <%@ page import="java.sql.*" … | |
I recently started coding in Java and have been trying to use the native methods to link code from other languages like C and C++. My code for the file is: [code=java] public class NativeDemo { int i; public static void main(String args[]) { NativeDemo ob = new NativeDemo(); ob.i … |
The End.