32,204 Topics
| |
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 … | |
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! | |
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 … | |
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: … | |
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... … | |
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 … | |
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 … | |
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 | |
[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" + … | |
[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 … | |
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, … | |
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 … | |
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 … | |
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); … | |
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 … | |
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 … | |
hello friend i want to change arabic or farsi alphabet convert into unicode so plzz give hints | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
I wish to make a project on Messenger using Java. But is [B]Java Socket programming[/B] necessary for it? | |
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; … | |
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 … | |
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 … | |
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 … | |
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 … | |
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; … |
The End.