Emaneitron
Emaneitron

Reputation: 83

What is the way to verify beforehand if a function works for any version of java jre?

I'm relatively new using java and recently tried some of my codes in other computers (with different versions of jre or jdk) ...for example, i've been trying to know if the function .newLine() works for jre1.6 ...but i can't find it

writer = new BufferedWriter(new OutputStreamWriter(
                new FileOutputStream(directorio523+"tabla1.txt"), "utf-8"));
writer.write("something");
writer.newLine();

So, is there a web wich identify that or a command for linux to put?

Upvotes: 0

Views: 41

Answers (2)

Check the class's Javadoc. In this case, the class is noted as being present "since JDK1.1", and the method doesn't have a more specific date, so anything since Java 1.1 should support it.

Upvotes: 4

Jean-François Savard
Jean-François Savard

Reputation: 21004

Simply consult the API for JDK 1.6 :

It does exists.

Upvotes: 1

Related Questions