32,199 Topics
| |
Hi folks! I need some homework help. I have the following requirements: // Strings required for Homework. String[]strVector = {"octhkeugrk", "fedjigchba", "mnpqdetjhz", "bgxlvfcdaz"}; a) Write code that transforms the string array provided above into a 2 dimensional character matrix, (e.g., char[][] charMatrix;). b) Once in the two dimensional array form, … | |
As an assignment, I was asked to build a java program which can inspect the content of a website, display and download a particular form of media on that web page or the whole web page (depending on the user's need) for offline viewing. I understand I need three components: … | |
Actually, I am working on project and specifications are : * using windows 7 ultimate * using Java language to develop project * using IntelliJ IDE for project now, When i run my project it give me output in the section at the bottom in the IDE itself. But, i … | |
I made this program but it isn't working; any suggestions? /* * Program Name : GuessGame.java * Author : James Resue * Date : October 6, 2010 * Purpose: Write a program GuessGame.java that plays the game “guess the number” as follows: * Your program chooses the number to be … | |
Hey guys! I want to use jtable to encode a grade, this is where i will enter the grade of the student. and when i click the submit button, the data should be in a variable where i can manipulate it and solve for the average. It will look like … | |
I am tring to implement a website search engine with java as an applet,I have used nutch as web crawler and cassandra as my database,I have to use a nosql database(because my teacher wants me to do),now my question is what should I do next to complete my search engine? … | |
Hi I'm trying to write a toString() method for a generic LinkedStack but I'm having trouble My class has two push methods. One pushes elements of some type onto the stack. It takes in some generic element and pushes it onto the stack. The other method takes in some generic … | |
I have been taking few different heap snapshots. What I see is that the memory usage is not the same as reported by this codes. So how to know the exact memory is being used by my java application. I also see my leak report from MAT reports a lot … | |
How do you find the dot product of 2 matrixes with: matrix 1 has arbitrary rows and arbitrary columns- user will input rows and columns, same for matrix 2 (to multiply, rows of matrix 1 must be the columns size of matrix 2 and column size of matrix1 must be … | |
1. There are some error in lion no 15 .can anyone help me to fix this??? 1. import java.util.Scanner; 2. 3. public class intArray 4. { 5. 6. public static void main (String [] args) 7. { 8. final int size =10; 9. int [] array = new int [size]; … | |
package pkg1; import java.awt.*; import javax.swing.*; public class Main { public static void main(String[] args) { JFrame frm = new JFrame("Title"); JTextField txt = new JTextField(); JLabel lbl = new JLabel("To"); JTextField txt2 = new JTextField(); frm.setLayout(new GridLayout(2,2,5,5)); frm.add(txt); frm.add(lbl); frm.add(txt2); frm.setSize(500,100); frm.setVisible(true); frm.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frm.setLocationRelativeTo(null); } } Someone please explaine … | |
Hi, I'm looking for help to achieve my projet. It's about an application that can be able to send sms to the users mobiles phone and receive sms from them. The project is the developpement of an application which can permit farmers organisation and products buyers to communicate by sms … | |
write a java program that will ask the user to enter his/her name initial - first and last name, and then output a greeting that says "Hello", followed by the user's initial and an exclamation mark.. | |
Cant find this error and all these java scripts are talking together can someone please find it. error has been noted blow. import javax.swing.JFrame; public class WindowApp{ public static void main(String [] args){ JFrame window = new JFrame("A window");//cans et the title on the title bar window.getContentPane().add(new ImagePanel()); window.setVisible(true); window.pack(); … | |
For some reason I am receiving this error , cannot find symbol, method Math random() not found . If anyone knows why it would be of great help. int digit1 = (int)(Math.random() * 10); int digit2 =(int)(Math.random()* 10); this is supposed to give me two separate random digit variables between … | |
The program is supposed to ask the user for the range of the guesing game (1-10), ask them how many guesses they want, and then ask them for a guess. Then it prints out Cold if he guess is greater than 25% of the answer, print WARM if its between … | |
Im kinda still new at java and with help, developed a java file that will take numbers from a text file and calculate a invoice that will format like this: Invoice -------------------------- Account Amount Due 10011 $12.25 10033 $11.70 -------------------------- Total $23.95 I got it to print out to console … | |
| Hi, This is my first post, forgive me for not being immediately familiar with any forum protocols. I am trying to read in a txt file and store the data in my class. I keep running into this error Exception in thread "main" java.lang.NumberFormatException: For input string: "./src.Chance" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) … |
Hello Daniweb, I will soon reach the point where I'm ready to move on my journey of programming. One thing that has always interested me is the mobile world. I would like to develop things for the mobile world. What I want to ask/know is tips from people already developing … | |
Hey Guys Im working on an assignment dealing with arrays. I have to Delete the duplicates in the array and re-display the array with the duplicates deleted. I Have code that I written up that is able to step throgh the process and will display the duplicated elements in the … | |
Hello Everyone, I'm having a lot of trouble trying to figure out how to do this, I'm a beginner and I am completely stumped. Can anyone help me with my program. I have to convert a string array to a char 2D matrix, this is what I have so far. … | |
I am doing a course in recommender systems on coursera.org. I have got an assignment in that. They have told us to use IntelliJ IDE and Lenskit to use. I am very good at C, C++, but not that well in Java. So finding it difficiult to get up these … | |
For some reason my java program can't find my textfile if i use file.next to display contents of the file but if use file.readLine it finds and shows the contencts of the filebut not the way i want for example: I want actual output like this: 1: Humps Black Eyed … | |
Hi, I am using eclipse j2ee juno eclipse market place is not working this is the error i am getting "Unexpected exception java.lang.reflect.InvocationTargetException" give me solution to fix it. thanks for your time. | |
Hi All, I want a make a system logger in java to track all the activity that is going on my system. Like 1)User Login 2)File Copy 3)Other Activities But,Being a beginner I don't have much knoweldge regarding my goal. Please provide your valuable feedback. | |
Hello, is there any other method to compare string in java beside using equal() and == operator ? Thank you | |
This is the code that I have done so far: import java.util.*; import java.awt.*; import javax.swing.*; import java.awt.event.*; class TSP extends JPanel{ int weight[][],n,tour[],optDist; final int INF=1000; public TSP(){ Scanner s=new Scanner(System.in); Random r = new Random(); System.out.println("Enter no. of Cities:=>"); n=s.nextInt(); weight=new int[n][n]; tour=new int[n-1]; for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ … | |
How can I figure out the time complexity of a program? The program is of the Travelling Salesman Problem. The aim was to implement the problem in two ways - Dynamic programming vs Simulated Annealing. Now I have to compare the two codes, find out which is faster and give … | |
My file: http://www.2shared.com/file/Y4I4l2kI/MysticWorld.html Convert to .class file please The errors: C:\xampp\htdocs\EMULADOR\Server\JAVAEX~1\org\MYSTIC~1\MysticWorld.java:221: error: illegal start of expression static class _cls5 ^ C:\xampp\htdocs\EMULADOR\Server\JAVAEX~1\org\MYSTIC~1\MysticWorld.java:277: error: malformed floating point literal switch(_cls5..SwitchMap.org.mysticworlds.WorldObject[type.ordinal()]) ^ C:\xampp\htdocs\EMULADOR\Server\JAVAEX~1\org\MYSTIC~1\MysticWorld.java:277: error: case, default, or '}' expected switch(_cls5..SwitchMap.org.mysticworlds.WorldObject[type.ordinal()]) ^ C:\xampp\htdocs\EMULADOR\Server\JAVAEX~1\org\MYSTIC~1\MysticWorld.java:277: error: case, default, or '}' expected switch(_cls5..SwitchMap.org.mysticworlds.WorldObject[type.ordinal()]) ^ C:\xampp\htdocs\EMULADOR\Server\JAVAEX~1\org\MYSTIC~1\MysticWorld.java:277: error: case, default, … | |
Hi, I have a problem while reading a jsp file. I have a jsp file called scan.jsp. It is a very big file having 9000 lines. It has java script codes, some imported files etc. Unable to read all lines of data when I try the following code. public static … |
The End.