35,618 Topics
![]() | |
Good day! I would like to ask how to enumerate the contents of certain vector and print it in a certain file because this code is having problems: [CODE] Enumeration e = v.elements(); ... while(enu.hasMoreElements()){ out.write(enu.nextElement()); }[/CODE] Error: ...: cannot find symbol symbol: method write(java.lang.Object) location: class java.io.BufferedWriter It seems … | |
Ok so I'm new at programming java(well not that new) but I do tend to hit a lot of wall and give up out of frustration. I need help. Can anyone suggest a book for beginners or something. I'm actually doing a computing course but I really don't wanna ask … | |
Hi I'm trying to connect using oracle10g with eclipse but its not able to locate the driver at all . [CODE] <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" import="java.sql.*" %> <% String uname="system"; String pwd="*****"; String url = "jdbc:oracle:thin:@localhost:1521:XE"; Connection con = null; Statement stmt = null; ResultSet rst = null; … | |
hello frndz, i was doing this program and then i encountered this strange problem... it is a program in which i want to open two text files and then compare it.. It is giving me two errors: 1)variable f1 might not be initialised. 2)variable f2 might not be initialised. and … | |
So I was trying to add elements into my list. But for some reason the words inside the list are very very small.... is there anyway to increase the font? I tried setFont, doesn't work. :( [CODE] import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.*; import javax.swing.event.DocumentListener; public class sub … | |
i) Create a class called Complex for performing arithmetic with complex numbers. ii) Write a driver program to test your class. Complex numbers have the form realPart+imaginaryPart *i Where i is: √-1 Use floating point variables to represent the private data of the class. Provide a constructor method that enables … | |
hi, I have following question 1) is main thread is daemon thread? if yes then how? 2) what is meaning of daemon thread? 3) Does daemon thread require main method for execution? 4) Daemon thread do its execution without main method? 5) if Daemon thread require main method can any … | |
Hello. I'm trying to add a single test record (a comment item) to my MySQL database. So here are my sources of JSF2 project. - main xhtml page: [code]<h:body> <h:panelGroup id="mainBlock" layout="block"> <h:panelGroup id="header" layout="block"> <h:graphicImage value="resources/logo.jpg" style=""/> </h:panelGroup><br/> <h:panelGroup id="menu" layout="block"> <h:panelGrid columns="1" style=""> <h:outputLabel value="MENU" style=""/> <br/> <h:form> … | |
Hi I am begginer to jsp I have downloaded apache-tomcat-7.0.19-windows-x86,unzipped it, Added an environmental variable JRE_HOME and it's value is C:\Program Files\Java\jre1.5.0_22 I have started tomcat from startup batch file , a console window appeared for a while then disappeared . when open my browser internet explorer and write address … | |
Hi there, I'm having a rather bad morning today and my brain is being stupid. I have an ArrayList containing String Arrays. How do I convert my ArrayList to a 2D Array? What I have: [CODE] ArrayList<String[]> transactionList = new ArrayList<String[]>(); String[] resultSetRow = {"String1","String2","String3","String4","String5"}; int resultsSetRowSize = resultSetRow.length; for(int … | |
I basically am trying to figure out how to store data into an array by calling a method enterSalary() within another method enterAllEmployees(). This is what the assignment is. I don't understand how to do it. Your solution must: • Store the salaries in an array (the department may not … | |
I am working on a snake game. I have posted about it before. It is going well, and now I would like to implement a high score option, that saves the score online, so that everyone can see it. I am planning to make a menu, that will have a … | |
hi.. i hav knowledge of j2se but i don't hav any knowledge how to create web application with j2ee.. i wanted to use jdeveloper for this last year project.. i donno where to start from. Need help..plzz.. anyone guide me where to start and what to study and learn? and … | |
Okay so I have a program that calculates the time it takes for my application to run and i need it to enter those times in one row in excel 2007. What is the code or way for doing this? There are 1000 times iteration so you can see why … ![]() | |
For now this has a sample dictionary of words, but later I will allow the user to provide their own dictionary. [CODE] import java.io.*; public class testReader { private String[] auto = {"lorem", "ipsum", "dolor", "sunglasses", "friend", "time", "flies", "like", "an", "arrow", "daisy", "bell", "the", "quick", "brown", "fox", "jumps", "over", … | |
"A static method can't access a nonstatic (instance) variable, because there is no instance!" The above sentence was culled from one of numerous books that i have consulted/study so far on [B]Java[/B],but till now am still having problem with my understanding about that so called [B]"static modifier"[/B] Because with the … | |
[code]<% String UN=request.getParameter("un"); String pw=request.getParameter("pw"); String FN=request.getParameter("FN"); String LN=request.getParameter("LN"); String L1=request.getParameter("L1"); String L2=request.getParameter("L2"); String L3=request.getParameter("L3"); String ccn=request.getParameter("ccn"); Class.forName("com.mysql.jdbc.Driver").newInstance(); java.sql.Connection myConn; myConn = DriverManager.getConnection ("jdbc:mysql://localhost:3306/train_resev","root", "3866" ); PreparedStatement ps=myConn.prepareStatement("insert into user values('" + un + "','" + pw + "','" + FN + "','" + LN + "','" + L1 + … | |
Hi all, i'm pretty new to java applets and been struggling to embed it into a webpage. I made a java applet using eclipse, and ran it using eclipse's applet viewer just fine. However i cannot embed it into my webpage. I placed the jar file i exported from the … | |
i have this code, when i run this script no error shows up, but at the same time no result shows up too :( i dont understand where the problem is... :( [CODE] String result2=""; String data2; URL u2; URLConnection uc2; u2 = new URL("http://genome.ucsc.edu/cgi-bin/hgc?o=32385948&g=htcUserAli&i=../trash/hgSs/hgSs_genome_44ba_e972d0.pslx+..%2Ftrash%2FhgSs%2FhgSs_genome_44ba_e972d0.fa+YourSeq&c=chr1&l=32385948&r=32386166&db=hg19&hgsid=204152805282 "); uc2 = u2.openConnection(); InputStream … | |
I have this snake game I keep talking about and I added in a menu. now when I run the snake game the first time it works. When I press T to return to the title, it returns. When I click on the colored snake game after that the snake … | |
I have placed thread is alive in a loop , so when the thread finish its work so i will start another work.... but this makes program heavier. is there any other method [code] while(thread1 is alive) wait getvalue from thread1 and start thread2 [/code] | |
is there any way to access some hyperlink on another webpage? the problem is that link always changes. thanks :) | |
We are asked to create a calculator but before I do that I must correct the codes given in order for me to know what I must add in my calculator but I do not know how to solve the "void cannot be referenced " error...how can I do that? … | |
Is there any class for information providing box when i bring mouse over the object in java. I mean when i bring mouse over the combo box it display information about that combo box I cant load picture, seems some error in picture loading area..... | |
I have connected java with oracle over lan, in connection string i have provided the IP address, now the startup is very slow, how can i make it fast, i have already asked the same question in java forum but no responce, so i thought oracle expertise can answer this … | |
Hi, If anyone knows about the source code of [LIST=1] [*][U][B]Depth first search [*]Breadth First search [*]Best First search [*]AStar[/B][/U] [/LIST] Please give me the code. Thank you. | |
Hey guys! I'm a bit new to java and I need your help. I do not need the WHOLE code for this program, I just want to learn how to do this. I just need to learn what should I use (loops, nested loops, etc..)and how should I do it. … ![]() | |
[code]import java.util.*; public class SelectSort { // instance variables - replace the example below with your own public int x; public ArrayList<Integer> a; public int n; public SelectSort(int b) { a = new ArrayList<Integer>() ; n = a.size(); for(int i = 1; i < n; i++) { SortNow(); //tried everything … | |
I just want to print the phone number in the form of (123)456-55778 for my result to be valid. I have tried a couple of thing but I am not arriving to the answer. Please help. [CODE]import java.util.*; public class TokenizingTelephoneNumbers { /** * @param args the command line arguments … | |
I have written a code which uses RXTX Serial API for communication. Now I want to distribute a jar file for my program. The problem is that since I have used RXTX Serial API jar & dll files for this needs to be copied in java home. I wrote a … |
The End.