Posts
 
Reputation
Joined
Last Seen
Ranked #2K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
100% Quality Score
Upvotes Received
6
Posts with Upvotes
6
Upvoting Members
6
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
1 Commented Post
1 Endorsement
Ranked #857
Ranked #1K
~26.6K People Reached
Favorite Forums
Favorite Tags
Member Avatar for riahc3

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 …

Member Avatar for JamesCherrill
0
607
Member Avatar for Violet_82

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 …

Member Avatar for Violet_82
0
7K
Member Avatar for jalpesh_007

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); …

Member Avatar for JamesCherrill
0
166
Member Avatar for asifalizaman

any one help me???????????????????????????????? how to convert text file to kml file using java???

Member Avatar for Starstreak
0
193
Member Avatar for javauser1512

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)) …

Member Avatar for Starstreak
0
306
Member Avatar for john.stepanek.9

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)); …

Member Avatar for Starstreak
0
304
Member Avatar for london-G

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 = …

Member Avatar for mvmalderen
0
308
Member Avatar for cgogte
Member Avatar for ~s.o.s~
-1
151
Member Avatar for Roshan92

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 …

Member Avatar for Starstreak
0
215
Member Avatar for wannafzan

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 …

Member Avatar for wannafzan
0
2K
Member Avatar for kristenw17

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. …

Member Avatar for JamesCherrill
0
249
Member Avatar for sapure

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 …

Member Avatar for sapure
0
177
Member Avatar for Delnith

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.

Member Avatar for stultuske
0
271
Member Avatar for linezero

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 …

Member Avatar for JamesCherrill
0
301
Member Avatar for abinaya.lingam

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 …

Member Avatar for JamesCherrill
0
342
Member Avatar for akinfemi

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 = …

Member Avatar for Starstreak
0
132
Member Avatar for Dane2259

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 …

Member Avatar for Starstreak
0
152
Member Avatar for laguardian

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 …

Member Avatar for NormR1
0
1K
Member Avatar for mikias.kidane.9

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 …

Member Avatar for Taywin
0
1K
Member Avatar for im abcd

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 …

Member Avatar for im abcd
0
459
Member Avatar for Ravish.Ahmad.Khan

**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 …

Member Avatar for Starstreak
0
169
Member Avatar for techxaidz

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 …

Member Avatar for stultuske
0
200
Member Avatar for dantheman4

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 ?

Member Avatar for Nutster
0
144
Member Avatar for mikias.kidane.9

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 …

Member Avatar for NormR1
0
247
Member Avatar for dantheman4

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 …

Member Avatar for Starstreak
0
359
Member Avatar for spring2014

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 …

Member Avatar for NormR1
0
603
Member Avatar for DahliaBasik

/** * @(#)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 …

Member Avatar for DahliaBasik
0
2K
Member Avatar for anglwthnati2de

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 …

Member Avatar for anglwthnati2de
-2
272
Member Avatar for jury

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)){ …

Member Avatar for Nutster
0
137
Member Avatar for greg2186

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 …

Member Avatar for greg2186
0
1K