invalid method declaration; return type required

Status
Nicht offen für weitere Antworten.

nils-ahrens

Aktives Mitglied
Hallo,

bei meiner Klasse Dateiverarbeitung kommt es bei mir beim Kompelieren dieser Klasse in der Zeile mit System.out.printIn zu einem Fehler.
Wie kann ich diesen beheben?
Fehlermeldung:
E:\JavaProj\Tutorials\Text Speichern\01_Basis\Basis\Dateiverarbeitung.java:19: cannot resolve symbol
symbol : method printIn (java.lang.String)
location: class java.io.PrintStream
System.out.printIn("Fehler beim Erstellen der Datei");
Über Hilfe würde ich mich sehr freuen.

import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.util.*;

public class Dateiverarbeitung {
BufferedWriter f1;
BufferedReader f2;

public Dateiverarbeitung(){}

public void dateiAnlegen(String n){

try{
f1=new BufferedWriter(new FileWriter(n));
}
catch (IOException e){
System.out.printIn("Fehler beim Erstellen der Datei");
}
}

public void zeileAusgeben(String t){
try{
f1.write(t);
f1.newLine();
}
catch (IOException e){
System.out.printIn("Fehler beim Erstellen der Datei");
}
}

public void dateiSchliessen(){
try{
f1.close();
}
catch (IOException e){
System.out.printIn("Fehler beim Erstellen der Datei");
}
}

/*public Vector lesen(String n){
String dat=new String();
String name=new String();
int tel=0,zaehler=1;
Vector v=new Vector();
try{
f2=new BufferedReader(new FileReader(n));
while((dat=f2.readLine()!=null)){
if(zaehler%2==0){
tel=Integer.parseInt(dat);
Freund freund=new Freund(name,tel);
v.addElement(freund);
}
else name=dat;
zaehler++;
}
f2.close();
}
catch (IOException e){}
return v;
}*/
}

/*Ciao
Nils*/[/quote]
 
G

Gelöschtes Mitglied 5909

Gast
println wie "Lessi" (abkürzung von line), nicht IN
 

nils-ahrens

Aktives Mitglied
Hallo rail{

danke, dass Du mir helfen willst, aber Deine Antwort kann ich nicht entschlüsseln!
Wie meinst Du dass?

/*Ciao
Nils*/
}
 
G

Gelöschtes Mitglied 5909

Gast
System.out.println ( das ist ein kleines "L", kein großes "I")

p.s. benutz bitte das nächste mal den code-tag wenn du dein code postest, dann kann man den auch lesen...
 
Status
Nicht offen für weitere Antworten.
Ähnliche Java Themen
  Titel Forum Antworten Datum
M Invalid Method Java Basics - Anfänger-Themen 7
N jodaTime java.lang.IllegalArgumentException: Invalid format Java Basics - Anfänger-Themen 3
X Gänsefüßchen als invalid character constant Java Basics - Anfänger-Themen 2
J Variablen Invalid Character - Error -> Spiel mit Variablenergebnissen Java Basics - Anfänger-Themen 8
B java.sql.SQLException: ORA-01722: invalid number Java Basics - Anfänger-Themen 9
A JEditorPane + html -> java.io.IOException: invalid url Java Basics - Anfänger-Themen 4
S Compiler-Fehler java.lang.SecurityException: Invalid signature file digest for Manifest main attributes Java Basics - Anfänger-Themen 5
D Compiler-Fehler void is an invalid type for the variable Java Basics - Anfänger-Themen 5
G invalid AssignmentOperator Java Basics - Anfänger-Themen 3
0 "Invalid Unicode" Java Basics - Anfänger-Themen 2
M JavaEditor macht Probleme! Invalid Flag! Java Basics - Anfänger-Themen 9
F Invalid option Java Basics - Anfänger-Themen 3
S java programm started nicht: invalid or corrupt jarfile Java Basics - Anfänger-Themen 3
G Hello World: Invalid Path Java Basics - Anfänger-Themen 6
R finaler Wert in outerMethod von method in InnerMethodClass Java Basics - Anfänger-Themen 2
S Methoden 2 non-static Methoden, trotzdem Fehler "non static method can not be referenced from a static context" Java Basics - Anfänger-Themen 9
P myClass?.method() in Java Java Basics - Anfänger-Themen 4
T setFill method Java Basics - Anfänger-Themen 3
H Methode mit Array als Rückgabe This method must return a result of Type int[] Java Basics - Anfänger-Themen 2
N The method setSaldo(double) in the type Konto is not applicable for the arguments (int, int) Java Basics - Anfänger-Themen 2
A startsWith method und substring Java Basics - Anfänger-Themen 2
W Remote Method Invocation RMI - Problem Java Basics - Anfänger-Themen 0
I Java Generics factory method Java Basics - Anfänger-Themen 2
V the static method should be accessed is a static way Java Basics - Anfänger-Themen 6
N Erste Schritte "non-static method" oder "XYZ can not be resolved" Java Basics - Anfänger-Themen 21
K Eigene Annotations, Pre-/Post-/Call-Method Java Basics - Anfänger-Themen 6
B Threads Thread sleep() Method einfache Frage Java Basics - Anfänger-Themen 8
G Was als main Method Java Basics - Anfänger-Themen 6
M Cannot make a static reference to the non-static method Java Basics - Anfänger-Themen 10
E Array to String Method Reverse Java Basics - Anfänger-Themen 5
D Methoden undefined method Java Basics - Anfänger-Themen 13
S Method mit Eingabe abrufen Java Basics - Anfänger-Themen 1
D Interface Amazon Skill Kit, Interface but method in other class? Java Basics - Anfänger-Themen 3
U Method References Java Basics - Anfänger-Themen 1
UnityFriday method getPrevious in class List<ContentType> cannot be applied to given types Java Basics - Anfänger-Themen 29
P Variablen einer Methode in andere Method übergeben Java Basics - Anfänger-Themen 6
B Methoden The method mirror(double[]) in the type Convolution is not applicable for the arguments (double) Java Basics - Anfänger-Themen 8
J easy remove method Java Basics - Anfänger-Themen 1
M abstract method does not override or implement.... Java Basics - Anfänger-Themen 7
R The method printf(String, Object[]) in the type printStrem in not applicable for the arguments ... Java Basics - Anfänger-Themen 3
M Deklaration und Initialisierung bei Method Erstellung Java Basics - Anfänger-Themen 12
K Variablen RETURN in Case-Switch / This method must return a result of type Item Java Basics - Anfänger-Themen 4
W Compiler-Fehler "non-static method cannot be referenced"-Problem Java Basics - Anfänger-Themen 6
K String equalIgnoreCase() Method Java Basics - Anfänger-Themen 19
E non-static method und static context Java Basics - Anfänger-Themen 15
L Command Prompt / Main Method / String Java Basics - Anfänger-Themen 9
M Methoden "Non-static method xy cannot be referenced from a static context" Java Basics - Anfänger-Themen 20
T selection method does not contain a main type Java Basics - Anfänger-Themen 7
U UML Factory Method Java Basics - Anfänger-Themen 4
R Compiler-Fehler Cannot find symbol (Method printIn) Java Basics - Anfänger-Themen 3
H non-static method cannot be referenced from a static context Java Basics - Anfänger-Themen 2
L Cannot make a static reference to the non-static method Java Basics - Anfänger-Themen 6
B Object "Method" in TreeSet, Fehler beim Vergleichen/Comparable Java Basics - Anfänger-Themen 9
M Problem mit Static Method Java Basics - Anfänger-Themen 8
W Main-method in Object-classes Java Basics - Anfänger-Themen 5
J Compiler findet method nicht Java Basics - Anfänger-Themen 12
M This method must return a result of type int Java Basics - Anfänger-Themen 13
M Fehlermeldung: the method.... ist undefined for the type object Java Basics - Anfänger-Themen 6
S this method must return a result of type double Java Basics - Anfänger-Themen 2
G Collections.binarySearch(LinkedList): cannot find method Java Basics - Anfänger-Themen 6
Y Theorie: Abstract Method Java Basics - Anfänger-Themen 6
C Methoden numberField.getDouble no such method error Java Basics - Anfänger-Themen 4
F Mal wieder: Cannot make a static reference to the non-static method Java Basics - Anfänger-Themen 9
F Cannot make a static reference to the non-static method Java Basics - Anfänger-Themen 3
Q non-static method blub cannot be referenced from a static context Java Basics - Anfänger-Themen 6
E Netbeans, "class does not have a main method" Java Basics - Anfänger-Themen 8
L no such method error: main() Java Basics - Anfänger-Themen 2
O Abstract Method & Generics Java Basics - Anfänger-Themen 10
N public class -> public method -> variable private? Java Basics - Anfänger-Themen 10
R Could not find main method Java Basics - Anfänger-Themen 3
U Boolean istGleich() Method Java Basics - Anfänger-Themen 15
Luk10 method () not found Java Basics - Anfänger-Themen 9
A OOP Fehler non-static method can not be[...] Java Basics - Anfänger-Themen 2
N Reference to non-static method Java Basics - Anfänger-Themen 8
G non static method scale(int,int) cannot be referenced from a static context Java Basics - Anfänger-Themen 16
A The method getYear() from the type Date is deprecated Java Basics - Anfänger-Themen 6
A cannot find symbol - symbol : method Java Basics - Anfänger-Themen 5
S The method readInt() Problem Java Basics - Anfänger-Themen 5
E method undefined - wo ist der Fehler? Java Basics - Anfänger-Themen 5
J non static method cannot be referenced from static context Java Basics - Anfänger-Themen 7
L cannot find symbol-method Java Basics - Anfänger-Themen 3
D kleine Passwortabfrage erstellen incl. Method zum verändern Java Basics - Anfänger-Themen 7
S Mein Quicksort Problem: he method quickSort(int[], int, int) Java Basics - Anfänger-Themen 2
F does not overwride abstract method Java Basics - Anfänger-Themen 2
C Fehler: non-static method Java Basics - Anfänger-Themen 5
B method intValue() is undefined for the type String (?) Java Basics - Anfänger-Themen 4
R Cannot make a static reference to the non-static method Java Basics - Anfänger-Themen 5
G String zu Method Java Basics - Anfänger-Themen 11
B cannot find symbol method equalsIgnoreCase? Java Basics - Anfänger-Themen 23
T Does not have a main method ? GGT. Java Basics - Anfänger-Themen 4
T this method.is not visible Java Basics - Anfänger-Themen 3
C overridden method does not throw java.io.IOException Java Basics - Anfänger-Themen 4
R non-static method execute Java Basics - Anfänger-Themen 3
J Morgen Java-Klausur. Stack, Heap, Method-Area Java Basics - Anfänger-Themen 2
V Non Static Method. Java Basics - Anfänger-Themen 2
S Method undefinded for "Klasse" Java Basics - Anfänger-Themen 4
R Eclipse: This method must return a result of type double. Java Basics - Anfänger-Themen 2
M Fehlermeldung (The method contains(String) is. Java Basics - Anfänger-Themen 3
M Fehlermeldung (the method add(OE) in the type Abteilung.) Java Basics - Anfänger-Themen 2
N ActionListener versch. Buttons zuweisen => versch. Method Java Basics - Anfänger-Themen 13

Ähnliche Java Themen

Neue Themen


Oben