32,204 Topics

Member Avatar for
Member Avatar for sullivan757

I'm trying to figure out how to produce the following code: • Add person • Print all people (alphabetically by name) • Print all people of a designated type (faculty, staff, students) • Print a faculty member and the students who are studying the program taught by the faculty member …

Member Avatar for sullivan757
0
3K
Member Avatar for caswimmer2011

Hey, Is there a way to play a system beep on mac os x in Java? I usually use the beep function in Toolkit class for my PC but I tried the beep function in Toolkit but it doesn't work on my mac. Any help? Thanks in advance!

Member Avatar for harinath_2007
0
277
Member Avatar for Java2011

Hey i have a assignment in which i have a digital billboard its almost complete but i just have 1 line that is stopping my program from doing what its suppose to do. Im suppose to have a program that can display block letters when the user enters a word …

Member Avatar for Java2011
0
144
Member Avatar for daNiUB

Hello, I was wondering if anybody can help me write data fields for an instrument(Guitar) and the number of strings it has (6) and an array of string names representing string names (E,A,D,G,B,E). I have my code done for tuning and playing not sure how to do the other part: …

Member Avatar for ceyezumma
0
110
Member Avatar for kulpreet lkaur

hii i've java 1.6.0_11......n window 7...whnevr i try to save file in java\jdk1.6.0_11\bin then it gives a msg i.e you don't have permission to save in this location.contact to administrator to obtain the permision.... so um nt coming to kwon how to take permision from administrator and save my file... …

Member Avatar for kulpreet lkaur
0
140
Member Avatar for chiiqui

I am once again experimenting and Only to find out that java is pass by value, how do I actually manipulate a method or an array that has been pass to another method? for example [CODE]int[]a ={1,2,3,4,5,6}; modify(a); ________________________ void modify(int[] aTest){ aTest[1]=2; }[/CODE] //take note that those arrays are …

Member Avatar for JamesCherrill
0
248
Member Avatar for rajhans

Hello All, I have stuck in a problem. There are set of strings of different length. I have to remove repeated elements from all the strings except from the string in which it appeared first. For example say the input strings are "3 4 7 2 15 10" "5 7 …

Member Avatar for rajhans
0
207
Member Avatar for sidra 100

m a begineer of java programing plz tel me wats wrong in my program. [CODE]// my first program public class HelloWorld { public static void main(String[] args) { System.out.printIn("Hello World"); } }[/CODE] it shows the error cannot find symbol. symbol:method PrintIn(java.lang.string) location: class java.io.printstream system.out.printIn("helloWorld") 1 error

Member Avatar for vijaykavin10
0
94
Member Avatar for eziekiel123

[CODE]import java.util.*; public class scwhile{ static Scanner input = new Scanner (System.in); public static void main (String[] args) { char letter; String inputMessage; String inputString; String outputMessage; inputMessage = "Program to convert uppercase " + "letters to their corresponding "+ "telephone digits.\n" + "To stop the program enter #.\n" + …

Member Avatar for JamesCherrill
0
233
Member Avatar for gahhon

[CODE] public class Rectangle { private double length; private double breadth; public void Rectangle(){} [COLOR="Green"]public Rectangle(double length, double breadth){[/COLOR] this.length = length; this.breadth = breadth; } public void setLength(double length){ this.length = length; } public double getLength(){ return length; } public void setBreadth(double breadth){ this.breadth = breadth; } public double …

Member Avatar for ~s.o.s~
0
121
Member Avatar for nick6987

we given a program department program which user enters a number to a specific department and now our teacher wants us to convert that to a switch and use enum data type having a little trouble with some of the errors. [CODE]import java.util.Scanner; enum MenuOptions currentPrompt { BILLING, FORECLOSURE, LISTING, …

Member Avatar for stultuske
0
148
Member Avatar for WDrago

All, I can't seem to find anything on the web about how to connect to a LibreOffice database. I am currently using the following code to connect to a MS Access database and would like to know how to change it to work with LibreOffice. [CODE]String strConnect = "jdbc:odbc:DRIVER=Microsoft Access …

Member Avatar for WDrago
0
3K
Member Avatar for rotten69

Hey everyone, I have been looking for video tutorials on SWING class and pretty much of GUI side in Java .. I found tutorials on Oracle site but they require lots and lots of reading.. if anyone knows a good site that has videos on GUI, please share it.. Time …

Member Avatar for ceyezumma
0
427
Member Avatar for StephNicolaou

Hi all, Trying to simply call method, (below) from another class and return the value found by the scanner. Please see below: [code] public int getInt(String prompt) { System.out.print(prompt + "a"); //int result = in.nextInt(); if (in.hasNextInt()) { x = in.nextInt(); y = in.nextInt(); sum = x+y; System.out.print("sum" + sum); …

Member Avatar for StephNicolaou
0
147
Member Avatar for Laxman2809

So I have been tasked with creating a program that is essentially a planner for a person. It has to have the abilities to add events of 3 types(Party, Dance Class,Club Meeting). It then has to be able to display everything enter, and be able to display the things that …

Member Avatar for stultuske
0
119
Member Avatar for Neversleepin

Hi all, Here is what i found with google to Find and Replace word in Java: [CODE] public class ReplaceAll { public static void main(String[] args) { String str="We want replace replace word from this string"; str=str.replaceAll("replace", "Done"); System.out.println(str); } }[/CODE] It works well but how to do the same …

Member Avatar for stultuske
0
1K
Member Avatar for 2k9-it

hello friend i want to change arabic or farsi alphabet convert into unicode so plzz give hints

Member Avatar for stultuske
0
76
Member Avatar for AQWst

I am new to GUI Java programming and I am attempting to find the best way of creating a frame to contain a series of menus. I am first adding logic to have the date and time appear in the frame, but the way I am doing it they are …

Member Avatar for stultuske
0
418
Member Avatar for Dersev

Hello I have a small problem with ListSelectionListener. I can not copy dataList.getSelectedValue().toString(); to global String variable text. How can I do it ? This is inside of if statement and that is the problem. Anyone knows how to solve it ? [CODE] ListSelectionListener lListener = new ListSelectionListener() { public …

Member Avatar for mKorbel
0
317
Member Avatar for ceyesuma

Hello all. In my Apache derby db I set up Decimal data types like this: [code] admin_pay_rate DECIMAL(5,2), [/code] I use JFormattedTextFields to filter decimal usage in text fields concerning money Like admin pay rate would be 150.00: this is good. In the JFormattedTextField it will allow 1,000.00 but the …

Member Avatar for mKorbel
0
206
Member Avatar for zaxon1987

Okay so basically I'm studying Introductory programming using the 'BlueJ' Java program on Mac. I'm trying to create a 'Dynamic Billboard' program that asks a user to enter a five letter word using the letters; ' S, P, A, R, E', then displays it in white on a black screen …

Member Avatar for JamesCherrill
0
220
Member Avatar for vijaykavin10

In applet we are using init() method so inside of the init() method can we use the actionPerformed method or can't?.If we couldn't which place can be implements that action performend method. Also you just give me the syntax for creating the actionperformed method in applet.And that applet must have …

Member Avatar for mKorbel
0
146
Member Avatar for Nathan_11

I have this code that would randomize the number inputs but should not include 0 and 50 and above digits... how should i do it? Thanks [CODE]import java.util.*; public class RndomA { public static void main(String[]args){ int[]A=new int [10]; Scanner in=new Scanner(System.in); System.out.println("Numbers to be randomize:"); for(int a=0;a<A.length;a++){ Random r=new …

Member Avatar for stultuske
0
138
Member Avatar for Onlineshade

I wish to make a project on Messenger using Java. But is [B]Java Socket programming[/B] necessary for it?

Member Avatar for stultuske
0
80
Member Avatar for solarmotion

I had encounter a problem in my task. How come the output always return false? [CODE] public class Entity { private String itemCode; private String title; private String description; private int language; private int time; private String productCompany; private int status; public Entity(){ itemCode="E250"; title="The Lookout"; description="by Scott Frank"; language=1; …

Member Avatar for solarmotion
0
113
Member Avatar for crazybeaner

I'm creating an odometer program. "The problem to solve is define a class Odometer that will be used to track fueland mileage for an automobile. The class should have member variables to track the miles driven and the fuel efficiency of the vehicle in miles per gallon. Include a mutator …

Member Avatar for javaAddict
0
377
Member Avatar for ynwa

Hi, I am currently using swt-win.jar on my 64 bit Windows Operating system. The error i am facing is that the the following Exception in thread "main" java.lang.UnsatisfiedLinkError: Cannot load 32-bit SWT libraries on 64-bit JVM Is there any swt jar file for 64 bit windows operating system and 64 …

Member Avatar for ~s.o.s~
0
62
Member Avatar for newbie14

Dear All, I have a snippet of code as below. Here I build one db connection and is shared across. I can put the dbconn.commit in place and no problem. The problem when I put the dbconn.rollback I get this sort of error "commServer.java:1798: unreported exception java.sql.SQLException; must be caught …

Member Avatar for newbie14
0
245
Member Avatar for Acidburn

hey guys I'm trying to get hold of a StreamConnection [code] try { StreamConnection conn = ( StreamConnection ) Connector.open ( url ) ; } catch (Exception ex) { ex.printStackTrace(); } [/code] however when i do this i get the following error [quote] java.lang.ClassCastException [/quote] According to my know of …

Member Avatar for Bens
0
162
Member Avatar for lbgladson

I have a program to add coins into a piggy bank and calculate the total but my program is not asking how many of each coin and will not give me the total. [code] import java.util.Scanner; public class PiggyBankTester { public static void main(String[] args) { int pennies; int nickels; …

Member Avatar for sirlink99
0
1K

The End.