- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 5
- Posts with Upvotes
- 5
- Upvoting Members
- 5
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
Often we're faced with the need to represent primitive data types as readable/writable bytes that can be sent through a data stream. In Java, there are classes such as DataOutputStream/DataInputStream that can do the work for us, but often a programmer wants to manage the conversions himself (or herself, to … |
|
Re:
I am a new programmer in Java and while programming I faced the following problem. I am trying to use switch statement on String but it gives compilation error. If any one suggest me how to use String in switch-case statement , it will be helpful to me. |
|
Re:
the errors are commented in the code: help??? [code]import java.awt.*; import java.awt.event.*; import java.applet.*; import javax.swing.*; import java.lang.*; public class Kol2_1 extends Applet implements ActionListener { Button plus = new Button("+"); Button minus = new Button("-"); Button times = new Button("*"); Button div = new Button("/"); Button eq = new … |
|
Re:
my program is compiled.but on run that i have message "Exception in thread "main" java.lang.NullPointer Exception" 1. class Rev 2. { 3. char a[]; 4. char i=3; 5. void str() 6. { 7. for(i='A';i<'D';i++) 8. { 9. a[i]='i'; 10. } 11. } 12. void show() 13. { 14. for(int i='A';i<'D';i++) … |
|
Hi. I've had this problem with all my ubuntu installations (two, to date), and I can't find my way around it.. Even when I switch to runevel 3, by booting with special options or typing telinit 3.. Even THEN, X server starts up, and that's the ONE thing I need … |
|
Re:
The source of my COPYRIGHTED tictactoe java game. It shows how to use multiple classes, methods, etc. |
|
Re:
ok, I have created a mobile application for a java enabled phone. I want to make the classic pong game with one paddle, and a number of blocks to break. I have managed to get the ball bouncing around the screen and off the block using a set of if … |
|
SO, I'm playing around with an idea. I'm trying to convert primitives to and from a char array for file logging. I've got all the details worked out, but I don't understand something.. Take the following case, for example: [CODE]public static byte[] ToByta (short data) { return new byte[]{ (byte)(data … |
|
Heyo My laptop has a webcam and a mic built-in on top. The laptop is XPS M1210 The distro is Kubuntu 2.6.20-16-generic The problem I've had, ever since I bought the laptop and installed beloved Ubuntu, is that while the webcam is not supported, it overheats rapidly while the laptop … |
|
Hey! There has been a question on my mind for a while regarding the JRE and the class loader (or, loading classes into RAM if it's different). Java classes define variable members, methods, and subclasses. I know that when you create a new instance of a class, memory is allocated … |
|
Re:
I'm having major issues trying to do the following: Write a program that reads in a line of text and then outputs that line of text first in all uppercase letters and then in all lowercase letters. If anyone can help me with that I'd greatly apprciate it. |
|
Re:
Hey guys.., Plz Help me out for this..... Is there any provision.... for giving security to a jar file.....i can easily unzip all the files from jar using winrar... and we can easily get .java file from .class so i want to know is ther any way to provide security … |
|
Re:
Hi. I have a bunch of Java codes I have done and I was wondering if there is a possible software or program to convert it into c++? This is because I've done it in Java and now my lecturer wants it to be in c++ >< The concept is … |
|
Re:
Hello I need help. I need to write a program that changes all upper case letters to lower case letters and all lower case letters to upper case then the vowels with an *... it would look like this normal= UppER loweR caSe output should be this.. *PP*r L*W*r C*s*.. … |
|
Re:
A friend of mine and I are taking an external computer science test. While studying the review it has become apparent that some of the syntax presented is quite unfamiliar. Here are a few examples: [INLINECODE]Stack<Integer> s = new Stack<Integer>();[/INLINECODE] For this line of code what exactly is the purpose … |
|
Hey. My question is, can laptops have startup problems if they're cold? If the answer is No, or They Shouldn't, then I will call the depot and interrogate them as to Why my computer fails to start in the mornings. My problem is, sometimes when I turn on my computer, … |
|
Re:
[COLOR=black]how to lock a keyboard using java code[/COLOR] |
|
Re:
I have an employee class see atthachement whic compiles fine and i have written some code called EmployeeAdd which uses the Employee Class which was deifining an Employee. However my problem is when i am trying to import the Employee in to EmployeeAdd the error message i am getting is … |
|
Re:
Hi all, I Just have to retrieve the data from the oracle database n just write the retrieved data to text file.Please Can anybody send me the code? Its very urgent. [IMG]http://forums.devx.com/images/smilies/frown.gif[/IMG] Thanks in advance. |
|
My question today is regarding multidimensional arrays, and synchronization.. I'm working on a client/server project and I'm not sure about the theory of an idea I came up with: I have an array: [INLINECODE]Object[][] myArray = new Object[256][];[/INLINECODE] It is an array of arrays. The length of myArray is 256 … |
|
Hi! I'm looking to learn something today, and I have just the question. In writing a recent program, I found no Java method suited to compare two byte arrays. Maybe the method exists, or maybe not. In any case, this is a learning expedition, and I came up with a … |
|
Hi. I'm not sure where this belongs, but it'll be fine here. I came up with an idea for a website/service.. It's a really good idea. I've searched, and searched.. I've found nothing like my idea in existence. I think it has a lot of potential at becoming a popular … |
|
So I've run into this situation a million times in my "learning career" and I've always found a long way around the issue so as not to risk throwing unnecessary exceptions.. Let's look at a simple example... [CODE=java]boolean IsEnabled (JPanel MyPanel) { return MyPanel.isEnabled(); }[/CODE] Throws java.lang.NullPointerException if null is … |
|
[B]Hey![/B] This is a "style" question. Is there some defined custom for the order in which parameters are given to a function, or does it depend entirely on the programmer's stylistic preference? What if the developed software should be released to other programs to incorporate in their own programs? Obviously … |
|
I installed Ubuntu Linux this morning and got java jdk 1.5.0_09 installed, along with Eclipse, and then I imported a project I've been working on into the Eclipse workbench. All configuration is fine, as far as I can say. My problem: The program I am working on uses the Enum. … |
|
I found this odd... Sometimes, and only sometimes, when I turn of on my laptop and log in, my sound system fails to function. No tune is played at startup, xine can't initialize sound drivers, etc. Then if I restart my system everything usually works fine. Why is this? Does … |
|
Re:
I have an algorithm problem with recursion: i have a route from A to D and it looks like this [CODE] [A, B, C, D][/CODE] the alphabet in the above list is an object of a class, lets call that class Nodes each of this Nodes object they have some … |
|
Hey! So, I have a laptop installed with both Windows and Linux. Linux comes first, logically, so its partitions fill up the first 90 Gigs of my HD. Windows comes at the Very end, filling the remaining 30 Gigs. Interestingly enough, Linux reads and writes from its partitions silently, but … |
|
Re:
can someone explain how i could go about applying this recursive method to a string of integers from a text file. so far i have read the string into an int array in my main using a tokenizer and im unsure of how i should manipulate the array now. also … |
|
Re:
Hi everyone, I need to ask a rather silly question on escaping quotes so please bear with me for a while. As i am using java this is what i usually do to escape quotes [code] "/"Test"/" [/code] It usually works but my question is that is this a platform … |