35,618 Topics
![]() | |
I have written a code in java for the following scenario. There is a class called Student and it has registration number and name as instance variables and student count as a class variable. Student class has two methods called display which is supposed to display the details of a … | |
I have a problem with serializing an Arraylist. This is my method to serialize Arraylist: public void serializeObj(){ ArrayList<Actor> novylist = new ArrayList<Actor>(); novylist.addAll(components); try { FileOutputStream fileOut = new FileOutputStream("zeditoru.ser"); ObjectOutputStream out = new ObjectOutputStream(fileOut); out.writeObject(novylist); out.close(); fileOut.close(); }catch(IOException i) { i.printStackTrace(); } } components is Arraylist with theese … | |
how can i make a servlet to validate a form with two file upload one image and other a pdf file. along with the other string parameters like name age gender etc., i need to validate the pdf and image files in servlet and save it in folder of my … | |
this code has following error --it ensures that the username is unique but still insert it into database please help me to debug this error. | |
| |
Hi i have a page say test.jsp It has some href links which redirect to the same page with some unique attributes depending on the link Now depending on the link clicked the page will be reloaded(as it redirects to itself) with new data. Now i want to take an … | |
Hi Everyone, I'm hoping that someone might be able to help me on the following: I would like to have a textarea type control on a webpage that would permit a user to highlight some text in the 'textarea', open a file dialog box, and insert a link behind the … | |
I'm creating an app, that displayes a String from a database. This String is then displayed in a textbox that cannot be edited. I now require that varible (ID passed) in the text box to be compared with a column in a SQL database table which is an identical String. … | |
I am new to JSP. I am doing a course. where they require me to build a registration page. and when we submit entries must be into database. So that when we log in the username and password must match then only welcome page should come otherwise error page. and … | |
Often we're faced with the need to represent primitive data types as readable/writable bytes that can be sent through a data stream. In Java, there are classes such as DataOutputStream/DataInputStream that can do the work for us, but often a programmer wants to manage the conversions himself (or herself, to … | |
Here's my assignment question: > **Develop a Payroll class that consists of two user-defined methods, namely calculateNetPay() and printOutput() methods. The calculateNetPay() method is used to calculate the employee's net pay, as the formula follows: > > Net pay = gross pay - state tax and federal tax > > … | |
i have written following code so far. But now i am stuck with one porblem. I have made a loop that exactly modify Numeric Quasi identifier by one by one. Now problem is: I hv made loop that modifies exactly once,twice and all four Q.I.(Quasi IDentifier) How can i make … | |
Hi, i have two buttons: Add button and Clear button one Jlist 1- when i click on Add button, it will add some data in the jlist. 2- when i click on Clear Button, it will clear perfectly the jlist. but when i re-click on Add button, here it add … | |
Can anyone please tell me how to run the genetic programing examples given in the **Watchmaker Framework library using Net Beans**? I have added all the jar files in a library and added this library to my project.But still I am unable to run the examples. Thankyou ! | |
In this code, I am prompting the user to pick a number from 1-1000 and having the user keep it in his/her head. Then, in 10 tries or less I am trying to have the computer guess the user's number. This is what I have so far... import java.util.*; public … | |
Hi guys, I got a problem with my Programm after adding a new Class in my Tic_Tac_Toe version...I tryed to use a method of the clas KI_Test1 ( which is a very simple "AI"). The class before without static works. After changing everythin in static, because my main method is … | |
Hello guys! I need some help... I'm new in Java programming and I'm dealing with in issue. I'm at a step of my project that keeps stoping me from going further. I have some xml files that contains diacritics and I need to read them and extract the tag's that … | |
Hi everybody. Sorry for the newbie post. I have an assignment I was just looking for some help with. I need to create a dice game that generates a random two dice throw and then gives you three tries to guess the number. I seem to be a bit stuck. … | |
Could someone help java code to read number of lines, words and characrters in paragragh . | |
Hi, I'am creating a single JFrame UI, that uses multiple JPanels (implemented through JTabbedPane). The problem I'am having is aligning the objects within each JPanel. In the first JPanel all of the objects are centrally aligned. I'am unsure of what to do to solve the problem. I have read the … | |
A web server is used to process http request and send a response back to the client browser. I was wondering how does a client browser send a http request to the web server? Is it done via socket connection? Which socket connection is used to establish a connection with … | |
Hello i want to encrypt or hash some data and put them on the database. Which is more secure encryption or hash and how i can do this? thank you very much for your help | |
HI I was wondering if you can help me with this random number program. import static java.lang.System.out; import java.util.Scanner; import java.util.Random; class GuessAgain { public static void main(String args[]) { Scanner myScanner = new Scanner(System.in); int numGuesses = 0; int randomNumber = new Random().nextInt(10) + 1; out.println(" ************ "); out.println("Welcome … | |
["Objects that are instances of an inner class exist within an instance of the outer class"](http://docs.oracle.com/javase/tutorial/java/javaOO/nested.html) Even though I attempt to create an independent instantiation of the inner class, the outer class is always there because of the statement above. ##Is that ture? If true, then that would also mean … | |
Hi can you help me please how can i change the color of progressbar or just look like in windows xp progress bar...please help me...thank you in advance hoping for your positive responds... | |
Hi, My below code is working only if there is a single row. could you please help me in doing it for all the rows retrieved from the database. view plaincopy to clipboardprint? <%@page import="java.util.concurrent.CountDownLatch"%> <%@include file="DBCon.jsp" %> <html> <head><script type="text/javascript"> function invoke(but) { if(but==5) { document.abc.action="Users_2.jsp"; } else if(but==6) … | |
I am trying to get the ItemListener to work on this program. I keep getting an error that says the method getSelectedItem cannont be found and cannot figure out how to fix it. import java.awt.*; import java.awt.event.*; public class Buttons extends Frame implements ActionListener, ItemListener { public Buttons() { //set … | |
How to add css to all jsps in java web project. Is it possible using web.xml ? | |
Hi All I am new to java. I am facing a problem I want to compare a string to a set of strings, For example there is variable string x, If the value String X matches to String A , String B, String C then run the particular code otherwise … | |
Hi I am currently working on a project where I have to find the most frequently occurring word in an imported file. I have imported the file and can display what it says, but Im having trouble with this part: [COLOR="Green"]"Create a Word class that has a string and a … |
The End.