logo

Crowdly

Browser

Add to Chrome

Gegeben ist folgendes Programmstück: Was ist das Ergebnis dieses Pr...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

Gegeben ist folgendes Programmstück:

1

2

3

4

5

6

7

8

9

10

import

java.io.File;

public class Dateien

{

public static void

main(String[] args) {

File[] dateien;

dateien =

new

File[5];

dateien[0] =

new File("testDatei.txt"

);

boolean

erg = dateien[1].setReadOnly();

}

}

Was ist das Ergebnis dieses Programmstücks, wenn die angegebene Datei existiert und die Dokumentationen für den Konstruktor und die Methode

setReadOnly() der Klasse File folgendermaßen aufgebaut sind:

File(String pathname)
Creates a new File instance by converting the given pathname string into an abstract pathname.
boolean setReadOnly()
Marks the file or directory named by this abstract pathname so that only read operations are allowed.

More questions like this

Want instant access to all verified answers on elearning.tgm.ac.at?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome