32,199 Topics
| |
I have an assignment where I need to do some operations on polynomials (add, multiply, ...) which are represented by linked lists. Part of the assignment is to make an inner class Term containing two int fields and a constructor with coef and exp ints) I also need an inner … | |
Hello I am down to 1 error can anyone please assist; java:41: not a statement + "P or p (premium): "; It is part of this section; System.out.print ("Enter the service type:") + "R or r (regular), " + "P or p (premium): "; serviceType = console.next ().charAt (0); System.out.println(); | |
Alright, so I'm suppose to be using SAXparser to parse a XML file and output certain parts The assignment asks us to use to classes Course.java and TextBook.java to which we are suppose to create the Course and Textbook objects described in the XML file, making sure they refer to … | |
Polybius Square is a table that allows someone to translate letters into numbers. To give a small level of encryption, this table can be randomized and shared with the recipient. In order to fit the 26 letters of the alphabet into the 25 spots created by the table, the letters … | |
hey, i have x and y coordinates that move around the screen randomly the position of the coordinates always vary they could suddenly stop or the movement speed could increase. what i want is to find out at what speed the coordinates are traveling in miles per hour. (not necessarily … | |
Hi everyone, For a group assignment we have to develop a property trading game similar to monopoly. At the moment we have the GUI developed as well as a basic idea of how to go about doing it but was wondering if anyone could help a bit!:S Is it possible … | |
Hi, currently i created a lucene project and currently having a problem with the codes. Here are my codes (which i also refer to some useful websites explain lucene) [CODE] import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.standard.StandardAnalyzer; import org.apache.lucene.search.IndexSearcher; import org.apache.lucene.search.Query; import org.apache.lucene.queryParser.ParseException; import org.apache.lucene.queryParser.QueryParser; import org.apache.lucene.search.Hits; import org.apache.lucene.index.*; … | |
Hi all, How do i store matching substring and string inside one single arraylist? example: [[er, every, errant]] which saying er substring is inside string every and errant.how should i make the comparison? basically what i did is only make 2 arraylist a1 = new ArrayList(); a2 = new ArrayList(); … | |
i m a student of BCS final year . i want to developed a games in java . any one have idea about game . plz share with me thank you! | |
hai..my name is harinath. i cant find javax.speech package anywhere .. how can i get javax.speech package??????? | |
Well, here's my problem. I have to Count from Num1 to Num2 by input from the user. So when I input let say 1 to 5, it will display 1 3 5. If I do 2 to 6, it would display 3 and 5. I can't seem to get the … | |
[code]import java.io.*; class caesercipher { String str; int key; public void main()throws IOException { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); System.out.println("ENTER A STRING"); str=br.readLine(); System.out.println("ENTER A SHIFT"); key=Integer.parseInt(br.readLine()); String encrypted=encrypt(str,key); System.out.println(encrypted); String decrypted=decrypt(encrypted,key); System.out.println(decrypted); } public String encrypt(String str,int key) { String encrypted=""; int i; for(i=0;i<str.length();i++) { int c=str.charAt(i); if(Character.isUpperCase(c)) { c+=(key%26); … | |
A matrix to be designed in following manner for a n x n order : 1 5 9 2 12 13 14 6 8 16 15 10 4 11 7 3 view sourceprint?01 int i,j,k,l,m,b=n; 02 int w=1, x=2, y=3, z=4; 03 int a[][] = new int[n][n]; 04 for(i=0;i<=n/2;i++) 05 … | |
Hey everyone, New to Java and i was hoping if anyone could assist me.I needed to write a program that could display results of Champions League initial menu screen with the following set of options: 1. Display the current score for each possible response. 2. Vote 3. Quit the program. … | |
Hi ,I have super class vehicle,truck extends vehicle,and I created array in test class full with objects from vehicle and truck,how can I call method from vehicle,is this the way (truck)object1[1].getMethod() | |
I trying to finish this assignment for Java and it's really getting to me. I haven't had this much trouble in the past, but things ramped up pretty quickly and I'm really stuck. I'll post what I have, although it's not much, if someone out there is kind enough to … | |
Hi, first time poster, and fairly new to java swing.Im trying to make a scrabble game and am stuck while trying to place a letter on the board, or even removing one for that matter. The playing board is just an array of JButtons all derived from a ScrabbleButton object, … | |
Hello, The following custom class has compiler errors where it is not recognizing KeyListener. Any idea on why I am getting this error? [CODE]import java.util.concurrent.*; import java.util.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; public class worker1 extends Thread { private SynchronousQueue<Object> q; private int i; public worker1(SynchronousQueue<Object> q) { super("Worker … | |
[CODE] import java.io.*; import java.net.*; public class Server { ServerSocket ss; ObjectOutputStream oos; ObjectInputStream ois; public Server() { try { ss = new ServerSocket(8888); } catch(IOException e) { e.printStackTrace(); } } public void run() { String message; try { Socket sock = ss.accept(); System.out.println ("Connection received from " + sock.getInetAddress().getHostName()); … | |
| Hey guys!! first off please dont tell me to google it, iv already done my searching with google and various text books lol ... Ok So i understand how to find numbers in a linear search by inputting 10 numbers and searching. Now i need to do the same except … |
Hi - Im creating the game "Tanks" for the fun of it. Im fine with creating and adding the images and other inner game workings but I have digressed abit and have encountered a problem. The problem is this: I have painted the tank image to the panel but wanted … | |
the below code display the bill date fields empty when testing the code.can someone assist in identifying the error? [code]String custId = request.getParameter("customerId"); String emailId = request.getParameter("emailId"); String phoneNumber = request.getParameter("phoneNumber"); String[] dateStr = new String[3]; String[] status = new String[3]; try { //Code to connect to the database String … | |
hey, i have got three sets of x an y coordinates , where one of the x y coordinates keeps on changing all the time. lets say i have first set where the coordinates are int x=100 and int y=100; second set would be : int x=100; int y=150; but … | |
I have created a java application in which JTextpane is used as an editor. Now my problem is that when I select a block of text and press tab key, it automatically deletes the selected text contents. I don't expect these behaviour for my tool's editor. I need to add … | |
Hi there, we are trying to do a project on Web based video conferencing.. i guess we will test it on LAN. it will be a web page where multiple users can perform video conference... we are confused which platform to use for this? Java or C#, please suggest kindly.. … | |
Hello, i downloaded aglets 2.5 from this site : [url]http://fluca1978.blogspot.com/2010/07/aglets-25.html[/url] please read the first comment by [U]nader 74[/U] : [CODE]Hi, I'm student. I have use Aglets2.0.2. But, when I used Aglets 2.5-alpha, I can not install the ant and I use Java_Home = C:\Java\jdk1.6.0_21 ant I have this error :[/CODE] … | |
Hi all, I am new in java. How can I sort a linked list on the basis of a particular string..? I have created a class with two elements, 1. Name 2. Address and I am reading these elements many times Now I want to sort this on the basis … | |
So im working through this and im having troubles finishing it off. Essentially im reading a text file, and tokenizing the numbers in the file, but what needs to be done is for each line in the file to be store in its own Queue, and then the Queue's need … | |
hey can anyone help me........... the below code is for getting a jpeg image called rabbit which resides within the bin folder...... [CODE]Image img= getImage("rabit.jpg");[/CODE] instead of placing the image in the bin folder.........can we call a image by giving a path like [B]("D\:Images\rabbit.jpg")[/B] is there any method with which … | |
I am trying to use below code for java to sqlserver connectivity.. [code] import java.sql.*; import java.util.*; import java.io.*; import java.lang.*; public class AuthorsInfo1 { public static void main(String args[]) { try { String str = "select * from authors where au_city like 's%'"; String str1 = "com.microsoft.sqlserver.jdbc.SQLServerDriver"; Class.forName(str1); Connection … |
The End.