36,051 Topics
![]() | |
If anyone has an idea for a program written in Java please reply. This is about my degree in cs so I would like to hear many ideas. I've seen many projects and haven't find something :-/ Thanks in advance Alex... | |
how do i get random number for 10 to 99 is this right Random generator = new Random(); int num1; num1 = generator.nextInt(99)+ 10; System.out.println(+num1); or or this is right does it go from 0 to 99??? num1 = generator.nextInt(99); System.out.println(+num1); which is the code for 10 to 99 | |
a generalized list structure can be declared in C as follows: [code=C++] typedef struct element{ bool sign; union{ char data; element* link; }; element* link; } [/code] as you see in this approach an element can have either "data" or "element* link"(the last link is included in every element) and … | |
Hey everyone, I was just wondering if there is a method as part of the JTree class that would accept a parameter such as an instance of DefaultMutableTreeNode and change the content of the tree with that tree node as the root. I am looking for a method of doing … | |
i am doing HND in computing and i need to develop a software project; the problem that i have no idea what can i develop. actually if i can find a real world case or areal customer ,i will develop it for him for free; but he should not be … | |
hello all ,I have writen a program of LinList with First Node,but i don't kown to write the LinList without the First Node.Who can help me amend from the following program.Thanks ahead!!! [CODE]public class LinList implements List{ Node head; Node current; int size; LinList(){ head=current=new Node(null); size=0; } public void … | |
Hi, i am trying to do a project using Java language and MySQL. In my Java interface, there have a JComboBox which will calling MovieName from MySQL database. After i click on one of the MovieName in JComboBox, the schedule and also the information of the MovieName from the database … | |
Hi :) I'm doing a programming project with development of an algorithm for a quadratic recursive sequence: (3, 3, 7, 11, 19, 20, 32), but I can't figure out which expression to use. I know it's probably got something to do with the differences of n-1 and n-2 being added … | |
hi everybody i have a problem of using iText for printing an existing pdf files. while reading the API of iText i came across methods where the Document object can be used and pdfWriter and writing pdf files etc. but i couldnt figure out how to print a given pdf … | |
About two weeks ago, I noticed my Sony VAIO Laptop (five years old, runs on Windows XP) would run SVChost.exe to 99 processes, running about 4,000 k of space, and was under the user name "Network Service". This would only happen when I was trying to re-connect to the internet … | |
How can I have a switch command send to a ftp site? Here is what I have. Instead of $to_email is there one for URL? Thanks everyone. Erich switch($attn1) { case 'employees': $to_email = "ftp://myftpsite@rgl-e.com"; break; | |
Hello sir Can u say me how to retrive data from database and showing the result on the html page.well i have created a user DSN named as new then created a database named as DB n created a table named as information. well i am using sql server 2005. … | |
This is my code [ICODE]import java.lang.Math; import java.io.*; public class TestDfunction { static void fun(float num1, float num2) throws IOException { BufferedReader read = new BufferedReader( new InputStreamReader(System.in)); String strNum1, strNum2; System.out.print("Enter the first number: "); strNum1 = read.readLine(); num1 = Float.parseFloat(strNum1); System.out.print("Enter the second number: "); strNum2 = read.readLine(); … | |
hi all i have a java collection question. i m using java list collection in my program and i m very confused how to iterate over the list what i have i like List<object> obj = ArrayList<object>(); now how can i iterate over this if somebody can explain me that … | |
The code I have written in Servlet is as follows: [code=Java]ArrayList news=admindelegate.getNewsdelegate();//this is defined already request.setAttribute("news",news); rd = request.getRequestDispatcher("ViewNews2.jsp"); rd.forward(request,response);[/code] and my JSP code is: [code=JSP]ArrayList newslist=null; ArrayList newslist=(ArrayList)request.getAttribute("news"); int newscount= newslist.size(); System.out.println("newscount:"+newscount); if(!newslist.isEmpty()) { for(int i=0;i<newscount;i++) { %> <tr> <Td><%=newslist.get(0)%></Td> <Td><%=newslist.get(1)%></Td> </tr> <% } } %>[/code] But this table … | |
I will type first the problem "Let the user Enter a Sentence. then determine the longest word(s) in that sentence " ex.#1 Input (Who is john galt ? ) output (john galt ) ex.#2 Input (Lets get jiggy with it) Output (jiggy) I already made a process for getting the … | |
Hi, I have a little servlet which does the following: [CODE] package Services; import java.io.*; import java.net.*; import javax.servlet.*; import javax.servlet.http.*; import java.util.Random; public class Service extends HttpServlet{ private String getContinent() { Random random = new Random(); int continent = random.nextInt(6); switch (continent) { case 0: return "EUROPE"; case 1: … | |
I am new in Java and need help :} currently working on a new project using netbeans, I have trouble to import commons-io-1.3.2 jar because i really need to use SuffixFileFilter class which is in commons-io-1.3.2 jar.Actually I have the jar but don't know how to import it into my … | |
This is probably something very simple, but I'm new to java and can't figure it out. PCAnywhere offers a java applet version which you can run on your PC or upload to your site. When I run it from the PC (double click on index.html) file loads fine, when I … | |
Hi, How can I remove the zero that appears after the decimal point. For example, I have 5.0 and I need the 5 only.... Thnx in advance.... | |
I have done up this cope to ask elementary students to solve the multiplication problems. The only problem I have is when the student gets the wrong answer, I don't know how to get the same problem back for them to answer the question again. Can someone point me to … | |
i'm using NetBeans and i keep getting an error in this code: [CODE=java]package desktopapplication7; import java.awt.*; import javax.swing.JFrame; import javax.swing.JPanel; public class Frame extends JFrame { Container c= getContentPane(); setLayout(new BorderLayout(5,10)); JPanel p= new JPanel(); p.add(new JButton("OK")); // ERROR HERE c.add(p,BorderLayout.Center); // ERROR HERE }[/CODE] on both lines above, it … | |
Does JSP support for each statement ?? Actually i need to cycle through each post variable like this in ASP for each tempvarname in request.querystring value1 = request.form(tempvarname) pass=pass&value1 next I am unable to do this JSP... Can somebody help ? | |
Hi, I writ a program that asks the user to input an integer and according to this integer the program should print astrisks equal to the input integer . The program does not compile ?? i need help fix this problem : import java.util.Scanner; public class Astrisksline { public static … | |
Hi, I am new in jsp. And I want to use web rowset in jsp. How can I use it can any one help me? Thanks | |
ok, yes this is a homework help question, and no i don't want just the answer. i actually really want to learn this. Ok, so I have to the simple date format that displays today's date in "week day month day, year) so here is what i got: import java.text.*; … | |
Hi guys/gals, I am student at University of Phoenix. I am not here to have you do my homework, I know this is not the place for that. I do need help though. I am trying to work through this course an really learn something. Many of you ar probably … | |
Hi everyone, I have a project that I have to do in C++. I have already done a very similar project in Java in another course. It's kind of amazing that the teacher that was teaching the java course got all of her materials from the C++ teacher. Anyways, my … | |
![]() | Hello, my first time on these forums, but im sure it will not be the last. I am doing my dissertation for computer science and my project is based on the classic time tabling problem using constraint satisfaction. My question is does anyone have any information or links on where … ![]() |
Hi everybody, I am new to Java, and can't figure out why my program is not recognizing the class Picture. The program compiles, but when I run it, it gives an error: Exception in thread "main" java.lang.NoClassDefFoundError: Picture at NewtonReal.main(NewtonReal.java:55) Please note that to run NewtonReal, you must include three … | |
int x=10; int total=10; do { total += x++; }while(x<15); System.out.println(x); The output of this program will be 15. I don't understand why 15 is the answer. I'm not understanding the arithmetic here. Doesn't the "+=" mean total = total + x? And doesn't x++ mean that the next value … | |
it looks like case 1, reading the data from a text doc is doing what it supposed to do (coz if i put the output lines under case 1 it works) however case2 doesn't have anything in the nameBox[] .. it didn't get the array index from case 1... any … | |
I am an IT undergraduate from Sri Lanka. I am new to java programming. I likie to fallow java in a proper way with exercises. please help me to learn java. | |
[code] <tr> <td height="52" colspan="8"> <table border="0" cellspacing="0" cellpadding="0" width="100%" class="rsTable" id=rsTable cols=4> <% if(UserModuleVO!=null){ %> <% for(int i=0;i<UserModuleVO.length;i++) { %> <% if(UserModuleVO[i].getUserSubModule()!=null){ %> <% for(int j=0;j<UserModuleVO[i].getUserSubModule().length;j++) { %> <% if(UserModuleVO[i].getUserSubModule()[j].getUserAction()!=null){ %> <% for(int k=0;k<UserModuleVO[i].getUserSubModule()[j].getUserAction().length;k++) { %> <tr class="form_list_table_contents"> <td><%= getSecDropDownDesc(2,UserModuleVO[i].getLayerModuleID()) %></td> <td><%= getSecDropDownDesc(3,UserModuleVO[i].getUserSubModule()[j].getLayerSubModuleID()) %></td> <td><%= getSecDropDownDesc(4,UserModuleVO[i].getUserSubModule()[j].getUserAction()[k].getLayerActionID()) %></td> </tr> <% … | |
Heres the problem that was given to me. Write an application that inputs a String and Search a Character and uses a method String Method IndexOf to determine the number of Occurences of the character in the string. we were told to use this book for research. How To Program, … | |
hi i am new to java and just start learning java so plese tell me which ebook is best for me if the book is free and you have download link then it's best for me i am waiting -PC(INDIA) | |
Hello. Well, I've been trying to create a a web app, using JSP+JSF technologies. I've completed writing the background classes, and also created a test jsp page: [CODE] <html xmlns="http://www.w3.org/1999/xhtml" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xml:lang="en" lang="en"> <jsp:directive.page contentType="application/xhtml+xml; charset=UTF-8"/> <head> <title>Please log in</title> </head> <body> <f:view> <h:form id="loginform"> <h:outputText value="Something"/> <h:commandButton … | |
The following is a question from my teacher along with the correct answer: public class IfTest { public static void main (String args[]) { if (true) if (false) System.out.println("a"); else System.out.println("b"); } } The code will compile correctly and display the letter b when run. I have to explain why … | |
Hey all, i'm writing a small program that multiplies matrices. The number of matrices is taken as an input, which means it varies according to input. so i'm having a problem on how to dynamically declare several matrices. is it possible to do that? | |
Hi guys, I'm currently doing a J2ME application that gets a JPEG image and sends it's bytes to a C# server via sockets. In the J2ME application, I can re-convert the bytes I sent to an Image and view it. On the server side, however, the SAME bytes cannot create … | |
Hi I have stored File objects in a vector. Now I which to call the methods of the file objects stored in the Vector. Unlike C++ you cannot simply refer to the vector by index e.g. vector[i].getAbsolutPath() nor can you simply call vector.elementAt(i).getAbsolutePath(); I have made a File[] array = … | |
Can you pls help me in making my case study, I badly need your help because im going nuts. This is about RANDOM ACCESS FILE. We will make a Student Info (The name of the cless should be StudInfo). It contains the diff info's of the student including Name,Grade,Passed or … | |
hello guyz,,do you have any sites to recommend for me on tutorials??? we are about to make a code on shopping cart,,but it's not that easy,, our list of products and shopping cart are stored in a "text file",,which is accessed by the "java file",,to access,,we should use the import … | |
I built my website using no Java so I'm quite ignorant. I'd like to use the "send to mobile" button from another site on my own website but I don't know if it's possible to do. Can anyone tell me the code I need to paste into my website to … | |
| |
We just started to learn decisions, and I'm confused. Wonder if someone could help me figure this out. In this assignment, you are going to calculate how much a BahnCard costs to buy, using the following rules. * BahnCard25. The card costs 110 euros for a first class card and … ![]() | |
Hi, Could anyone help me with this problem, the following code contains the GUI for a chargeback application which was handed on to me. I want to be able to test the components DC1 and DC2 to make sure information was entered when the btnGenChargeReport button is clicked... :?: I … | |
iam doing a project based on grid computing......i need an application to communicate between the systems.....plzz do help me in that.....its in Java | |
The assignment problem below ask me to calculate the number of months it will take to pay off the loan and the total amount of interest paid over the life of the loan. I'm having trouble trying to find the right algorithm for the monthly payments. Could you please take … | |
Hey can there be any reasons for the program that is written to play audio clips is not givin any response!!!! i wrote program correctly but i cant hear any sound from the audio device.. Anyone give solution plzzz!!! |
The End.