Browsing 7239 questions and answers with Jon Skeet
You're calling the parameterless getDisplayName() method whose documentation includes: This method is equivalent to: getDisplayName(false, LONG, Locale.getDefault(Locale.Category.DISPLAY)) The false here is the argument which... more 3/10/2014 11:57:10 AM
This is the problem: bufferedReader = new BufferedReader(new InputStreamReader(dto.getInputStream())); You're using an InputStreamReader, which means it's reading the binary data as text. Don't do that. Your OutputStream is fine, it's... more 3/10/2014 10:56:00 AM
The problem is that you're specifying the time zone just on the Calendar - which is only used to get the current instant in time, which doesn't depend on the time zone. You need to specify it on the format instead, so that it's applied... more 3/10/2014 10:17:07 AM
This is the problem, in your object initializer: phone={mobile="ff",home="ff",office="ff"} That's trying to set properties of an existing Phone object. In other words, it's performing: var tmp = new Cont(); tmp.sno =... more 3/10/2014 7:36:48 AM
You're using the Byte constructor which just takes a String and parses it as a decimal value. I think you actually want Byte.parseByte(String, int) which allows you to specify the radix: for (String text : s) { byte value =... more 3/10/2014 6:39:07 AM
Others have suggested creating just one User object. An alternative would be to have two User objects, but with the same reference for the value of the jim field: User keith = new User(); User justin = new User(); justin.jim =... more 3/10/2014 6:19:23 AM
8 and 55 are correct, but -57 mod 59 = 2 and not -57. How do I fix this? The % operator in Java isn't modulus - it's the remainder operator. It's behaving entirely correctly according to the language specification. When you suspect... more 3/9/2014 5:39:56 PM
I am to call my images I am using ImageIO.read(new File(imagePath)) Contrary to your title, this is not an Eclipse problem - it's simply a bug in your code, because your code assumes that the image is stored as a file in the file... more 3/9/2014 4:40:37 PM
Looking at the System.Linq.Expressions.Expression documentation, I don't think there's an expression type which represents "base member access". Don't forget that even though in your case it meant the same as just this, in other cases it... more 3/8/2014 7:55:40 PM
Well for there to be separate variables, you'll need to know all the numbers involved at compile-time. (You can't just generate more variables at execution time... and you really don't want to get into the business of working out the word... more 3/8/2014 1:47:08 PM