35,619 Topics

Member Avatar for
Member Avatar for overwraith

I hope this is the right location to make this post. I downloaded the source code for a rich text editor from; http://code.google.com/p/android-richtexteditor/ and the code will not compile correctly. The errors I get are; "Unable to resolve target 'android-4'", "AndroidManifest.xml file missing!", and in the Html.java file there are …

0
67
Member Avatar for subramanya.vl

I have this static block of code which is following Singleton design pattern. class Employee{ private static Employee emp; static { if (emp==null){ emp=new Employee(); } } public static Employee getEmployee(){ return emp; } } My doubt is if this code can be accessed by Mutiple threads concurrently and break …

Member Avatar for subramanya.vl
0
1K
Member Avatar for Violet_82

Hi there, I am just beginning to learn java right now, and have a real begeinner question. I ahve read that when you declare a float variable and ssigna value to it the number has to be followed by an "f". What I coudln't find out is why: `var floatNumber …

Member Avatar for Violet_82
0
168
Member Avatar for Sumal

**Can some one please help me with this ?** import java.util.*; public class Expression{ /* * Strings used for storing expression. */ String s, x; /* * Term evaluator for number literals. */ double term(){ double ans = 0; StringBuffer temp = new StringBuffer(); while( s.length() > 0 && Character.isDigit( …

Member Avatar for NormR1
0
311
Member Avatar for rami sohaill

package hospitalclient; public class Person { static int idnumber= 1500; private String name; private String telephoneno; private char gender; private String nationality; //No Parameter constructor public Person() { name="unassigned"; telephoneno = ""; gender = 'M'; nationality = "Saudi"; } public int getid() { return idnumber; } // Accessor Methods public …

Member Avatar for JamesCherrill
0
353
Member Avatar for a7x813

/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package testelimination3; import java.util.Scanner; /** * * @author Nick */ public class TestElim { public static void main(String[] args){ Scanner input = new Scanner(System.in); System.out.println("Please enter a set of numbers"); int[] …

Member Avatar for subramanya.vl
0
1K
Member Avatar for lalitapatil

Abstract—A video copy detection system that is based on content fingerprinting and can be used for video indexing and copyright applications is proposed. The system relies on a fingerprint extraction algorithm followed by a fast approximate search algorithm. The fingerprint extraction algorithm extracts compact content- based signatures from special images …

Member Avatar for NormR1
0
188
Member Avatar for AlexThugNastyTyricebiggumsBello

Ok i made a chat thing for a forum i have but it didn't work but there was a detail box and this came up on it. "Java Plug-in 10.9.2.05 Using JRE version 1.7.0_09-b05 Java HotSpot(TM) Client VM User home directory = C:\Users\Patricia ---------------------------------------------------- c: clear console window f: finalize …

Member Avatar for NormR1
0
248
Member Avatar for Maria Jalal

1. **Remove the words where last character is a capital letter from a given sentence.**

Member Avatar for JamesCherrill
0
133
Member Avatar for SHINICHI

I'm new here and I have an assignment about java that i'm not understand on how to do it.Here is the question: Write a test program that read an integer n and call a method to display a pattern as follows: 1 2 1 3 2 1 4 3 2 …

Member Avatar for jalpesh_007
0
134
Member Avatar for Linsley

i have to create a calculator (i'm a 12 year old) for the science fair. on textwrangler when i try to compile it :Expected end of line, etc. but found identifier. here is my code: import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.util.*; public class JavaCalculator extends JFrame { private …

Member Avatar for radhakrishna.p
0
404
Member Avatar for DEAD TERMINATOR

I am writing some code to read some information from a text file. The file is essentially three columns of numbers. The first columns are ints, the second are doubles, and the third is ints. So I have created a tokenizer that goes through line by line and interprets the …

Member Avatar for radhakrishna.p
0
214
Member Avatar for Kronolynx

i got a problem to make a program where i should use arrays the problem is in the next part, even though all the for loops are the same in this array `results[4][5] = i; // problem here nothing gets stored` nothing gets stored, so when i run the program …

Member Avatar for Kronolynx
0
149
Member Avatar for _eclipse

Hi guys I need some help writing a program where I store information from a textfile into a parallel array. I need to be able to do a multiplication sum with the amount,and an if statement. Here is the textfile James 550 Quinton 410 Liam 120 Taylor 600 Jake 270 …

Member Avatar for _eclipse
0
167
Member Avatar for kwesiaryee

Please can anyone help me with a simple sample on how to populate JCombobox with data(mysql etc) using Java persistence (JPA). I am quite new to this component so I desperately need help with this.

Member Avatar for radhakrishna.p
0
336
Member Avatar for oldezwe

Ideally my program should work like this... Upon button click a random message (out of 3 messages) is appended to a text area(or pane, etc). One message should display blue, one green and one red. Currently I am using JTextPane. I have figured out how to append text easily but …

Member Avatar for JamesCherrill
0
326
Member Avatar for Synapomorphy

Hey I'm having trouble with a HW assignment, no need to give me the answer out right but any help would be appreciated! I'm just trying to search a linked list and find a node then delete it. Here is what I have so far: void deleteSong() { char deleteMe[sz]; …

Member Avatar for JamesCherrill
0
106
Member Avatar for hilalihakim

I need urgently your help. Anyone can help how to Write a Java GUI program that accepts three user inputs (use text fields) with three check boxes. The check boxes determine whether the area, circumference and/or the volume of a circle/sphere is/are calculated. If only one check box is selected, …

Member Avatar for JamesCherrill
0
630
Member Avatar for zwench

I want to know if this is correct for what they are asking. If I try to put 7.5% in the `int=` spot it errors. I am a newbie who doesn't quite understand it all. The commission rate in the firstmethod will be entered as a decimal value (for example, …

Member Avatar for kanu.votka
0
911
Member Avatar for mdonald_101

Write A Program With A Method Name PrintFactors That Accepts An Integer As Its Parameter And Uses Fencepost Loops To Print The Factors Of That Number Separated By The Word "and"

Member Avatar for jalpesh_007
0
89
Member Avatar for Kronolynx

Hi i gotta display 2 arrays on screen but they don't look good i was wondering how can i make it look like this: Speed 20 88 75 80 68 77 81 Focus 30 90 77 83 71 84 85 Jetta 40 94 80 85 76 91 90 Contour 50 …

Member Avatar for NormR1
0
216
Member Avatar for jprog1000

Hello Members, I have a program (from Deitel Java Solution Manual) which bounces a ball using a Java thread inside a JPanel(which is inside a JFrame). When I made a custom class for the ball, the program is not painting anything on the JPanel.I would appreciate any help. Following are …

Member Avatar for javaprog200
0
350
Member Avatar for anand01
Member Avatar for jalpesh_007
0
144
Member Avatar for KRUX17

Hi, I wanted to know how I can add data to an ArrayList if the collection is not: `Private ArrayList<String> files;` and instead: `Private ArrayList<People> files`. Would the code look like this: public void addPerson(String name){ files.add(name); } or: public void addPerson(String name) { People people; // Declare an object …

Member Avatar for jalpesh_007
0
229
Member Avatar for junweixiong

Hello, I am making a authentication software, and this is the code for the Username panel. import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.util.Scanner; import java.util.ArrayList; import java.io.*; public class Username { private static String username; private static char[] actualUsername; public Username () { final JFrame frame = new JFrame("Username"); …

Member Avatar for junweixiong
0
4K
Member Avatar for junweixiong

Hello, I am making a Banking System, and this is the code for main. import static java.lang.System.out; public class BankSystem { public static void main (String[] args) { new username(); Password.setPassword("1234567"); new Password(); } } However, the problem is that both the username frame and password frame appears together. How …

Member Avatar for jalpesh_007
0
189
Member Avatar for java_programmer

I have a requirement where value of one field in an object will be determined dynamically using a configurable table. For example, suppose I have the following table - Pk | Reference_column ---------------------- 1 | TAB_REF.AMOUNT where TAB_REF is a reference table and AMOUNT is one of the column of …

Member Avatar for NormR1
0
124
Member Avatar for Benderx

Hi everyone, I was writing a program to show visually some vectors I was implementing with Java but I ran into an issue. My program has 3 classes, a driver, a Vector class and a VectorDisplay. The driver and vector class are self explanatory, but here is the code. Driver: …

Member Avatar for JamesCherrill
0
360
Member Avatar for javaprog200

Hello, I am writing a Java applet which uses the JExcel API to write to an Excel file. I have pasted the run-time error that I get below. After some research about the Exception, I added a policy entry using the policytool command for any Java program by selecting CodeBase<ALL>. …

Member Avatar for javaprog200
0
627
Member Avatar for CoilFyzx

Hello perhaps you could help me with a problem please. I wish to display a table of results using a JTable. Customarily I use a 2D Object array which is initialized with the data in a manner as follows: public Object[][] data={ {"Biology",25},{"Additional Math", 54},{"Geography",43},{"History",21},{"Spanish", 47}, {"Information Tech.",110},{"Technical Drawing",54},{"French",45},{"Physics",76},{"Chemistry",76}, {"Principles …

Member Avatar for CoilFyzx
0
326
Member Avatar for LdaXy_1

how do i check if a menu item in my JMenuBar has been clicked? for instance, i have a JMenu with an item called exit, which i need to make close the form. how do i do this? import javax.swing.*; public class selector_form extends JFrame { /** * */ private …

Member Avatar for <M/>
0
485
Member Avatar for junweixiong
Member Avatar for taylor.mitchell.353

I am working on a java project for school. I am trying to think more into a professional mindset rather than a student. The project I am working on is about hashing. The rest of the project looks really good, but this part makes me wonder if a professional programmer …

Member Avatar for taylor.mitchell.353
0
184
Member Avatar for anshuman.blaze
Member Avatar for NormR1
0
75
Member Avatar for bibiki

Hey there, I have the following code: int[] x = new int[7]; System.out.println(x.lengnth); x.length = 10; System.out.println(x.length); Of course, line three causes a "cannot assign a value to final variable length". However, line one does assign seven to that variable, length. Now, I have written a Testing class where I …

Member Avatar for bibiki
0
915
Member Avatar for mark.barrera.94

can u help me with this: public static void main(String[] args) { Scanner s = new Scanner(System.in); String name; System.out.print("What is your name? "); if(name.equals("Bob")) { System.out.println("Oh hi, Bob. I know you. Good to see you again."); name = s.nextLine(); } } } what can i do?

Member Avatar for NormR1
0
111
Member Avatar for mc.hitch

first i'm not much professional in JAVA programming but if you mentioned a code how hard is it I'll understand it ... I want to create a desktop application that is connected with an online database to insert/retrieve data from it ... I've searched a lot on google but no …

Member Avatar for bibiki
0
322
Member Avatar for mukiibi

This code can help you to find the square root of three numbers accepting the inputs from the user and displaying the results in a Joption pane. let me hope it will help import javax.swing.JOptionPane; import java.text.DecimalFormat; public class Squareroot { public static void main(String[] args) { String stringNum1,stringNum2,stringNum3; double …

0
99
Member Avatar for cyanide911

**EDIT: I understood what was wrong. I initialized adrsarr[4] before trying to put in values, then the problem was solved. Please close this thread.** package personal; public class TestAddress { public void buildArray(Address[] adrsarr) { adrsarr[0] = new Address("B402", "3", "42", "Behind Sector 9", "New Delhi", "Delhi", "Delhi", "India", "232113"); …

Member Avatar for jalpesh_007
0
102
Member Avatar for meenal9

Help..i need java program with help of bufferedReader and IOException... to find sum of 2 nos. entered by user.. plz help i am new to java...

Member Avatar for jalpesh_007
0
128
Member Avatar for qw1122

A parking garage charges a S.R. 2.00 minimum fee to park for up to three hours. After that, garage charges an additional S.R. 0.50 per hour for each extra hour or less. The maximum charge for any given 24-hour period is S.R. 10. No car parks for longer than 24 …

Member Avatar for jalpesh_007
-1
139
Member Avatar for Hammer Engineer

Hi I am trying to implement an array based BT.Here is my code for this. But I'm stuck with Postorder traversal. How can I get a Postorder traversal from my array based BT ? My Entire code is given here. package com.TreeLab; public class Stack { private final int SIZE …

Member Avatar for jalpesh_007
0
2K
Member Avatar for Brittinei

Write a program that prompts the user to enter a filename (use a Scanner to get the filename). The program then ouputs to the screen the number of lines, words, and characters in the file. Here is my code: (I'm getting a infinite while loop): import java.util.Scanner; import java.io.*; public …

Member Avatar for jalpesh_007
0
200
Member Avatar for Brittinei

Write a program that prompts the user to enter a filename (use a Scanner to get the filename). The program then ouputs to the screen the number of lines, words, and characters in the file. Im having trouble counting the words Here is my code: import java.util.Scanner; import java.io.*; public …

Member Avatar for jalpesh_007
0
278
Member Avatar for zlloyd1

I am trying to add a try catch block with switches to my program in NetBeans, and it is not excepting any of my already declared variables?? Here is my original code, without any validation: package annual; import java.util.*; import java.lang.*; public class Annual { public static void main(String[] args) …

Member Avatar for jalpesh_007
0
258
Member Avatar for taylor.mitchell.353

I created a hashing method to make a=1, b=2, c=3...etc. To me it doesn't seem too efficient. Does this look efficient or is there a recursive method or smaller method to do the same thing? /** * Changes String to int * @param key: String * @return (result % arraySize): …

Member Avatar for NormR1
0
301
Member Avatar for Akira01

Hi I recently started working with Java (this morning to be exact) and I'm running into some trouble. I'm trying to make a simple program that will put a deck of playing cards into an array, shuffle that array, then print the shuffled deck. My eventual goal is to make …

Member Avatar for Akira01
0
240
Member Avatar for priyajayan

i have to do a program in BDK.my BDK and JDK are in the same folder java. i have set the path for jdk/bin in control panel.i have created the jar file, jar cfm [jar file name] [manifest file name] [java class name]. i didn't get any error there. but …

Member Avatar for NIsha Smilee
0
232
Member Avatar for jib123

Hi all, this is my first post as a user, however ive been using this site to aid me in some of my programming assignments. I have become a little stuck with one program that i am trying to create which is a random number generator for 6 numbers. Ive …

Member Avatar for NormR1
0
1K
Member Avatar for cyanide911

I've been learning Java by myself through many different online and offline resources. I just finished some basic practice and theoretical knowledge of Swing. Now, to become good at it I need some practice problems which would test my Swing skills, including GUI Building, listeners etc. But I can't figure …

Member Avatar for NormR1
0
171

The End.