35,618 Topics

Member Avatar for
Member Avatar for dlgmu537

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 …

Member Avatar for dlgmu537
0
196
Member Avatar for marek2121

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 …

Member Avatar for subramanya.vl
0
764
Member Avatar for abevenkat

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 …

Member Avatar for subramanya.vl
0
215
Member Avatar for shruti.mendiratta.1

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.

Member Avatar for subramanya.vl
0
88
Member Avatar for Priyanka786
Member Avatar for tarugupta.92

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 …

Member Avatar for subramanya.vl
0
824
Member Avatar for CALGACUS

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 …

Member Avatar for subramanya.vl
0
149
Member Avatar for sunnykeerthi

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. …

Member Avatar for subramanya.vl
0
785
Member Avatar for mukulbimm

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 …

Member Avatar for subramanya.vl
0
197
Member Avatar for Cudmore

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 …

Member Avatar for subramanya.vl
1
5K
Member Avatar for UNDER-18 FG

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 > > …

Member Avatar for subramanya.vl
0
677
Member Avatar for jalpesh_007

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 …

Member Avatar for Taywin
0
213
Member Avatar for Neversleepin

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 …

Member Avatar for Neversleepin
0
287
Member Avatar for Gabriel_Linz

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 !

0
37
Member Avatar for joe.crook.9

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 …

Member Avatar for subramanya.vl
0
480
Member Avatar for AngelOfRock

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 …

Member Avatar for AngelOfRock
0
533
Member Avatar for Dee1004

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 …

Member Avatar for rubberman
0
440
Member Avatar for tabmanmatt

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. …

Member Avatar for JamesCherrill
0
277
Member Avatar for stopah2008
Member Avatar for JamesCherrill
0
253
Member Avatar for M-rhodes

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 …

Member Avatar for JamesCherrill
0
223
Member Avatar for solomon_13000

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 …

Member Avatar for ~s.o.s~
0
225
Member Avatar for xxmp

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

Member Avatar for jalpesh_007
0
870
Member Avatar for Violet_82

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 …

Member Avatar for Violet_82
0
204
Member Avatar for histrungalot

["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 …

Member Avatar for histrungalot
0
176
Member Avatar for jemz

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...

Member Avatar for Samanta Goutam
0
8K
Member Avatar for sunnykeerthi

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) …

Member Avatar for radhakrishna.p
0
168
Member Avatar for arcticman452

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 …

Member Avatar for mKorbel
0
131
Member Avatar for kirill226
Member Avatar for jalpesh_007
0
75
Member Avatar for myadav

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 …

Member Avatar for myadav
0
6K
Member Avatar for help_please

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 …

Member Avatar for JamesCherrill
0
596

The End.