- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 6
- Posts with Upvotes
- 6
- Upvoting Members
- 6
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
Re:
Hello Dont ask why but lets say I want to encrypt "hello" and the encrypted forum is "238324" I want to do: String avariable=dcrypt(238324); //avariable should now hold hello public string dcrypt(String encryptedtext) { //do decrypt stuff return descriptedtext; //decriptedtext should be hello } Basically thats what I want.....Dont care … |
|
Re:
HI all, I was wondering if anybody can help me to understand this exercise: "A small airline has just purchased a computer for its new automated reservation system. Write an application to assign seas on each flight of the airline's only plane (capacity: 10 seats). Your application should display the … |
|
Re:
I have created two socket file,But it is not working in proper way. please let meknow where the porblem is. TCPClient.java import java.io.*; import java.net.*; class TCPClient { public static void main(String ar[]) throws Exception { String fromserver; String toserver; Socket clientsocket=new Socket("localhost",10000); BufferedReader infromuser=new BufferedReader(new InputStreamReader(System.in)); PrintWriter outtoserver=new PrintWriter(clientsocket.getOutputStream(),true); … |
|
Re:
any one help me???????????????????????????????? how to convert text file to kml file using java??? |
|
Re:
import java.io.*; import java.util.*; class Q9 { public static void main(String args[]) { int a,b,c; System.out.println("\n\t Enter the value of A,B & C "); Scanner sc = new Scanner(System.in); a = sc.nextInt();b = sc.nextInt(); c = sc.nextInt(); System.out.println("\nLargest = "+func(a,b,c)); } public static int func(int a,int b,int c) { if((a>=b)&&(a>=c)) … |
|
Re:
This prompt scanner works outside of this program but when i integrate it, it doesn't work: All code work. just no together. Help would be much appreciated. Scanner in = null; Scanner key= new Scanner(System.in); System.out.print("Input file name: "); try { String filename = key.nextLine(); in = new Scanner(new File(filename)); … |
|
Re:
Hello, When I run the project using my localhost, everything works fie. But when I use an other server I get this error: No suitable driver found for jbdc:mysql:// public void populateList2() { Connection con = null; Properties conProps = new Properties(); conProps.setProperty("user", "abn859"); conProps.setProperty("password", "100011399"); try { con = … |
|
Re:
Please can anyone give me proper link for learning basics of JAVA... |
|
Re:
I am creating a simulation of a virtual video player (something like a very basic version of RealPlayer or Window Media Player). All the codes given below are error free. This is the main class: VideoPlayer.java This is the video player GUI (this frame is not resizable and the X … |
|
Re:
This is my assignment. I've done it 36 hours straight and I can't think properly so my program looks like kindergarden kid's program. Basically, we have to do a GUI for Pizza ordering. Everything works except for the amount. The output for amount is "0.00". I have to send it … |
|
Re:
So I am trying to make a code that will read a file that contains an unknown number of students and an unknown amount of scores for each student. Then output each students average score. I have tried several different combinations of loops and each times some problem comes up. … |
|
Re:
I've been studying C++ for two years, then started Java two months ago. My performance in C++ wasn't good at all although I study hard. I thought that the problem is in not understanding the language concepts but when I started a new language with the intention of building up … |
|
Re:
I am looking for your opinions on the best site or book in order to learn java. I am currently in school for C.S. learning C and would like to expand my knowledge. Thank you in advance. |
|
Re:
I have code in a txt file public class TestClass { static void main(String[] args) { int id; int number; id = 3; number = 33 telNo = id int id; } } I know how to read the file using bufferedreader and get the line number but i would … |
|
Re:
hi i need to convert my comma seperated text file in to a two dimensional array and i should be able to access each element in that array....i tried so many programs based on read line and split functions but i didn't get the proper output....please help me to do … |
|
Re:
hi all, been tryin to find wat is wrong with this code. It works for sometime then starts repeating the same value continuossssssly. any help will be appreciated. thanks /* THIS PROGRAM IS TO RUN A SIMULATION PROGRAM OF ARRIVAL AND SERVICE TIMES OF AN AUTO-REPAIR WORKSHOP * servTime = … |
|
Re:
I'm trying to alphabetize an array by comparing the characters at position 0 of two strings in an array, but I don't understand why when the if statement doesn't run my trail variable doesn't get incremented. //alphabetize array public class AlphaArray { public static void main(String[] args) { String[] yourChoiceItems … |
|
Re:
Hey guys, I'm trying to make this program that allows a person to set the size of an array to any value they choose. Then, the program will ask the user to input n values to be stored in the array at the corresponding index. Then the program modifies each … |
|
Re:
I am trying to figure out how to increase array size... let say i created string array that can hold 7 names but the user wanted to enter more than 7... so i am trying to write a program that double my array size with out me changing it manualy … |
|
Re:
I have just started learning java and made an first mathematical interactive program which I wanted to distribute with my friends . But I am unable to run the .jar file . I do the following , I click on export - Runnable.jar - Main.class and select the other options … |
|
Re:
**Following is the code snippet to print the series:-** *111 211 311 121 221 321 131 231 331 112 212 312 122 222 322 132 232 332 113 213 313 123 223 323 133 233 333* **But there's some mistake in the code and it gives ArrayIndexOutOfBoundsException.I'm not able to … |
|
Re:
PROBLEM: > Using a text editor, create a file that contains a list of five 4-digit account numbers. Read in each account number, and alter it to add a dash and a check digit, which is calculated by taking the remainder when the original number is divided by 7. Write … |
|
Re:
public static void total() { Scanner s = new Scanner("five six seven eight"); int num= 0; for(int i=0; i < s.length; i++) { if(s.charAt(i).equals("a") || s.charAt(i).equals("b") num++; } System.out.print(num); } public static void main(String[] args) { total(); } > What am I doing wrong ? |
|
Re:
I am having a problem with arrays.... for this assignment i can not use Arraylist... I only be able to use array of string. here is my problem. I am asking the user to enter words with in 1 minute ... when the time is up ..i need to print … |
|
Re:
import java.util.Scanner; public class LoopPatterns { /** * @param args */ public static void main(String[] args) { public static double Largest { Scanner s = new Scanner(System.in); int num, largest = 0; for ( int i = 1; i <= 10 ;i ++) { System.out.print("Enter a number : "); num … |
|
Re:
The purpose of the program is to take 4 user inputed integers (days, hours, minutes, and seconds) and output them as a floating point doubles to show the maximum amount of time possible for each. For example I input 2 days, 10 hours, 45 minutes, 20 seconds and it outputs … |
|
Re:
/** * @(#)GeometricObject.java * * GeometricObject application * * @author * @version 1.00 2012/9/10 */ public abstract class GeometricObject { private String color = "white"; public GeometricObject(){ } public GeometricObject(String color){ } public String getColor(){ return color; } public void setColor(String color){ this.color=color; } public String toString(){ return " the … |
|
Re:
Hi guys. I am having issues with the output of this program. Can somebody tell me what I have to do to make this work correctly? Here is the code I have so far: import java.util.Scanner; //text scanner to parse primitive types and strings using regular expressions. public class Operations … |
|
Re:
hy!!!!i am trying to write a java code that returns the majority element in an array and -1 if not!!this is what i came with public class Majority{ public static int arrMajority1(int A[]){ int n = A.length; int c = 1; for(int i=0;i>A.length;i++){ for(int j=i+1;j<A.length;j++) if (A[i]==A[j]) c=c+1; if (c>(A.length/2)){ … |
|
Re:
I'm a beginning programmer and am stumped on the last part of this assignment. I can't seem to figure out how to have the Letter Grade show. Here's what I have so far, any help as to where I'm going wrong would be much appreciated!! import java.util.Scanner; public class Lab1 … |