|
What are you playing at? If you don't understand it, because of your abundant lack of knowledge, then don't answer it with pure dribble.
If at first you don't succeed, you're not Chuck Norris.
|
|
|
|
|
Rajdeep,
You are stupid. Your answers are, at best, wrong and often plain misleading. Please, you obviously have no knowledge of java so don't damage other people's future by poluting their brains with this rubbish.
Stop. Desist. Go away.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
Welcome to the seventh sphere of hell that Rajdeep.Net brings along to whatever forum he trolls. So far he worked his way through VB.Net, C# and C++ forums with his idiocy and most often stupid, deceiving posts which he admitted where malicious with intent to hijack and/or harm other peoples property.
His posts should be ignored and disregarded, and marked as abusive as his answers are almost always are incorrect and misleading.
modified on Wednesday, July 22, 2009 12:11 PM
|
|
|
|
|
EliottA wrote: his answers almost always are incorrect
ftfy
He has a brain that lad. Keeps it in jat under his desk!
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
In all honesty, there is not a lot of information given here, as I don't exactly know what you are trying to do. Are you simply listing the data and adding/removing from it?
kyosugi wrote: May I know if there is any specific problems in my coding which results the game list to also show the video list?
Can you clarify what you mean by this please. Do you mean on the UI (ie. mistakenly added to it) or actually in the List variable? In which case, debug your code and have a look at where the List is generated/output and see why it is being added.
ps.
kyosugi wrote:
try {
Item i = (Item)in.readObject();
while (i != null)
{
items.add(i);
i = (Item)in.readObject();
}
} catch (EOFException e) {}
Simplified can be:
Item i;
while ((i = (Item)in.readObject()) != null)
items.add(i);
If at first you don't succeed, you're not Chuck Norris.
|
|
|
|
|
Difference between J2EE, J2SE, J2ME and when to use it.
|
|
|
|
|
Wikipedia?
Sun?
1 search with google?
The penultimate letter is used to define the target for the different versions and how they are used; Enterprise, Standard and Micro.
Seriously, read up on it via Sun's intarweb pages; they do explain it properly.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
Nagy, do you actually ever answer anyone's questions, or do you just tell them to look it up or flame them?
This answer is not so bad, but in the rest of your posts you never help!
|
|
|
|
|
I answer questions all the time. Unfortunately the answer is usually have a look. If the question had been for a clarification, then more info would have been forthcoming.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
I'm glad to see the local Hungarian IT guru has undeaded your laptop.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Nope. I was/am at work.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
|
Hi , ANYONE LET ME KNOW WHAT IS GOING WRONG HER, I AM TRYING TO CREATE ZIP FILE IN JAVA, BUE IAM GETTING THE ERROR AS FALLOWS, GO THRU THE CODE ALSO WHAT I WROTE
import java.util.zip.*;import java.io.*;
public class ZipFileExample {
public static void main(String args[])throws IOException {
FileInputStream fis=new FileInputStream("Allpaths.txt");
FileOutputStream fos=new FileOutputStream("kkk.txt");
DeflaterOutputStream dos=new DeflaterOutputStream(fos);
int data;
while((data=fis.read())!=-1){
dos.write(data);
fis.close();
dos.close();
}
}
}
eRROR: Exception in thread "main" java.io.FileNotFoundException: Allpaths.txt (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at ZipFileExample.main(ZipFileExample.java:4)
modified on Thursday, July 16, 2009 11:06 PM
|
|
|
|
|
Hi, please check your Caps lock. And use pre tags.
Anyway, are you sure "Allpaths.txt" exists?
Of course you are, otherwise you wouldn't be posting here with ALL CAPS, but would you check it again?
And that while loop looks fishy. Where is the closing }? I think it should be after the dos.write, but in this case you would accomplish the same by removing the opening {. This shouldn't even compile, but putting the } after dos.close is pretty much guaranteed to be wrong.
|
|
|
|
|
i closed properlly, eventhough iam getting same problem
|
|
|
|
|
chinnasri wrote: i closed properlly
No you didn't, you only closed in a way that would compile, not in the way that you should close.
But anyway, the problem is not caused by the weird closing - the problem happens before that. But if you don't fix the closing, it will be your next problem. Or maybe there will be something in between, but eventually it will be a problem if you leave it like this.
Please verify that the file that you are opening actually exists.
|
|
|
|
|
The documentation for FileInputStream is very clear, if you read it:
If the named file does not exist, is a directory rather than a regular file, or for some other reason cannot be opened for reading then a FileNotFoundException is thrown.
So, either make sure that Allpaths.txt is in the classpath for your application, or specify the full path to its location.
Your while loop is wrong. You close the input stream during the first iteration through the loop, immediately after writing to the deflater. So, the second time you try to read from it, it will fail because it is no longer open.
|
|
|
|
|
Hi Pals
This is my first post here in the forum. I've written a program which will compare two integer variables and display output. I have implemented Inheritance in the program. Here is the code:
package Demo;
public class A {
public int a;
public int b;
public A() {}
}
class B extends A{
int a1;
int b1;
public int M1(int a)
{
a1=a;
return a1;
}
public int M2(int b){
b1=b;
return b1;
}
}
class C extends B{
public void Compare(){
if (a1<b1)
{
System.out.println("The value:"+a1+" is smaller than:"+b1);
}
System.out.println("The value:"+b1+" is smaller than:"+a1);
}
}
class D{
public static void main(String args[])
{
B b=new B();
b.M1(50);
b.M2(100);
C c=new C();
c.Compare();
}
}
However, I get Logical error as this:
The value: 0 is smaller than: 0
This is incorrect, since I am passing values through the parameterized function call I am making to Methods: M1 and M2, in the main Method.
Please help me with a solution.
Help will be much appreciated,
Rajdeep.NET
(I will change that .NET surname to .JAVA soon)
I calculate my days on earth..... approximately 55 years remaining for me to expire
modified on Wednesday, July 15, 2009 1:52 PM
|
|
|
|
|
Rajdeep.NET wrote:
B b=new B();
b.M1(50);
b.M2(100);
C c=new C();
c.Compare();
You create two instances. In the 'c' instance you do not set M1 or M2.
C c = new C();
c.M1(50);
c.M2(100);
c.Compare();
If at first you don't succeed, you're not Chuck Norris.
|
|
|
|
|
Thanks Fly,
That was a silly mistake.
I calculate my days on earth..... approximately 55 years remaining for me to expire
|
|
|
|
|
0. Don't you dare even think you are a java monkey, let alone a guru!
1. Read the documentation from Sun. It's ALL online and FREE, you have no excuse.
2. Though not reserved the Compare() method is part of the Comparable interface; read all about it here[^].
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
Jack of all trades, master of none
If at first you don't succeed, you're not Chuck Norris.
|
|
|
|
|
??? Who ???
I are master of loadsatrades - plumber, painter, gardner, chef and occasional code-monk.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
Nagy Vilmos wrote: ??? Who ???
'it'
If at first you don't succeed, you're not Chuck Norris.
|
|
|
|
|
i'm trying to read an xml file in java webservice,but the problem is even though the path is given it always searches the
"c:\programfiles\glassfish2\domains\domain1\config"
how can i give the path for the xml file in the project folder .
|
|
|
|