Questions tagged [java-6]

Java SE version 6 was released in December 2006. Use this tag for questions specific to this version of Java.

Java SE 6 was an evolutionary change over the previous version. It did not include extensive language or JVM changes, however such changes were planned for Java SE 7 which was supposed to be released much sooner. (See here for what changed in Java 6).

As a stop-gap to the much delayed Java 7, Sun (since purchased by Oracle) introduced Java SE 6 Update 10, which despite its modest version numbering, represented extensive improvements to the GUI capabilities of Java in order to support JavaFX and Sun's renewed attempt to make Java successful in the GUI arena.

Internally, Java is numbered with a "1." before the number, so it will report itself as "1.6.0_" with an update number at the end. Starting with version 6, Sun dropped the ".0" from its marketed version number, so instead of 5.0 as previously done, it was Java 6.

Only use this tag if your question is specifically related to features of this version. Just because you are using this version, doesn't mean you need this tag. Use in addition to or instead of this tag.

See for more information.

1391 questions
-1
votes
1 answer

How to print a pre formatted text in java

i have string like this 31/12/2002 HINDUSTHAN MOTORS LIMITED THREE LACS SEVENTY SEVEN THOUSAND THREE HUNDRED EIGHTY SEVEN ONLY …
-1
votes
2 answers

Get the JDK version which is eclipse using to compile my current projects

I want to know which JDK is eclipse using to compile my current projects. Is there a way to know that from eclipse itself.
Shady Mohamed Sherif
  • 15,003
  • 4
  • 45
  • 54
-1
votes
1 answer

String comparison fails due to different int value to character '-'

I was testing postfix expression in junit tests where output is same But junit was still failing. I checked the char[] of expected and actual and there i found out character '-' was having different value. Actual = 4 8 + 6 5 - * 3 2 - 2 2 + *…
Delta
  • 537
  • 2
  • 5
  • 19
-1
votes
1 answer

Retrieve without iterating from a SingletonMap

I have created a method that return me a Map which is singleton Map as below @Override protected Map getFavTypeCd() { final Map favType = Collections.singletonMap("1","first"); return favType; } I was looking for…
user1993412
  • 802
  • 2
  • 15
  • 29
-1
votes
2 answers

Implicit super constructor is undefined with Java Generics

I have the following base class and sub class: public class BaseClass { public BaseClass(T value){ } public class NewClass extends BaseClass { public NewClass(T value){ } } I get the following error: Implicit super…
Alagappan Ramu
  • 2,270
  • 7
  • 27
  • 37
-1
votes
2 answers

Change the default behavior of my own classes to output value

I am creating a mini class in Java: public class ObjectInfo { public Object value = null; public Boolean isMax = null; } I want to make it so this class will output value whenever I call an instance. Example: public final void…
E.S.
  • 2,733
  • 6
  • 36
  • 71
-1
votes
1 answer

On Mac: Cannot run program /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java" in directory... error=7, Argument list too long

I get the following error. Cannot run program "/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java" (in directory "/Users/samschmid/Privat/dev/amsf/App-Management-System-Framework/App Management System"): error=7, Argument list…
Sam
  • 2,707
  • 1
  • 23
  • 32
-1
votes
2 answers

how hashcodes are calculated for objects in java?

Possible Duplicate: How is hashCode() calculated in Java I know every objects generated in java has hashcodes and also there can be two different objects with the same hashcode.So, i dont know hashcode generation depends on the object type or…
Saravanan
  • 11,372
  • 43
  • 143
  • 213
-1
votes
2 answers

Closing resources in Java

I'm currently doing something like this in java to free resources. Do I need to call close on the BufferedWriter object or is it called in the destructor? With regard to Resource1 and Resource2, I must call release and free respectfully. Is this the…
Baz
  • 12,713
  • 38
  • 145
  • 268
-1
votes
4 answers

String equals not working correctly

This is my debugging code: log.error(u.getName() + " - " + u.getName().length() + " - host_node" + " - " + u.equals("host_node")); My log: 11:27:16 [main] ERROR com.google - host_node - 9 - host_node - false Why it doesn't equal, I am…
Jaanus
  • 16,161
  • 49
  • 147
  • 202
-1
votes
1 answer

Google app engine SDK and Java SDK version conflict

Trying to get started with Google App engine using Eclipse IDE. Adding the app engine support to Eclipse installs App Engine SDK 1.7.1. Simple app runs fine locally. But when you upload to the Google servers it won't run because it is compiled with…
user1536633
  • 184
  • 1
  • 9
-1
votes
3 answers

Resource for annotation processing

I'm looking desperately for a valuable resource on Java 6 annotation processing. Ideally, the different points I would like to be addressed should be: The various Element interfaces and how to retrieve them from a class structure How to link a…
Alexis Dufrenoy
  • 11,784
  • 12
  • 82
  • 124
-2
votes
2 answers

How can I write this simple Java 8 line of code into Java 7

I'm trying to implement a CSRF token, but all the info is programmed with Java 8+ version, so what I need is some help rewriting this line in Java 6/7: tokenCookie = Arrays.stream(httpReq.getCookies()).filter(c ->…
Martinez
  • 1
  • 1
-2
votes
1 answer

java method refactoring when multiple if statements are used

How to refactor the below code when multiple if statements are used? Is there an alternate way for doing this? StringBuffer sb = new StringBuffer(); if (rowData.size() > 24){ sb.append(rowData.get(24).trim()); } …
ACP
  • 34,682
  • 100
  • 231
  • 371
-2
votes
2 answers

Convert arraylist elements order in sequence based on day

Below is the output from database. These sequence orders can not be the same every time. Here the days are not in sequence order . I need these days in sequence order. ArrayList dayList= [ MONDAY : 9:00AM - 5:00PM , TUESDAY : 9:00AM - 5:00PM ,…
RKCY
  • 4,095
  • 14
  • 61
  • 97