StringReader markSupported() method in Java with Examples Last Updated : 11 Jul, 2025 Summarize Comments Improve Suggest changes Share Like Article Like Report The markSupported() method of StringReader Class in Java is used to check whether this StringReader is supports mark() operation or not. It returns a boolean which states if the reader is mark supported. Syntax: public boolean markSupported() Parameters: This method does not accepts any parameters Return Value: This method returns a boolean value which tells if this StringReader supports mark() operation or not. It return true if it is markSupported. Else it returns false. Below methods illustrates the working of markSupported() method: Program 1: Java // Java program to demonstrate // StringReader markSupported() method import java.io.*; import java.util.*; class GFG { public static void main(String[] args) { try { String str = "GeeksForGeeks"; // Create a StringReader instance StringReader reader = new StringReader(str); // Check if the StringReader is // markSupported using markSupported() System.out.println("Is StringReader markSupported: " + reader.markSupported()); reader.close(); } catch (Exception e) { System.out.println(e); } } } Output: Is StringReader markSupported: true Program 2: Java // Java program to demonstrate // StringReader markSupported() method import java.io.*; import java.util.*; class GFG { public static void main(String[] args) { try { String str = "GeeksForGeeks"; // Create a StringReader instance StringReader reader = new StringReader(str); // Check if the StringReader is // markSupported using markSupported() System.out.println("Is StringReader markSupported: " + reader.markSupported()); reader.close(); } catch (Exception e) { System.out.println(e); } } } Output: Is StringReader markSupported: true Reference: https://docs.oracle.com/javase/9/docs/api/java/io/StringReader.html#markSupported-- Comment More infoAdvertise with us Next Article Reader markSupported() method in Java with Examples C code_r Follow Improve Article Tags : Java Java-Functions Java-IO package Java-StringReader Practice Tags : Java Similar Reads Reader markSupported() method in Java with Examples The markSupported() method of Reader Class in Java is used to check whether this Reader is supports mark() operation or not. It returns a boolean which states if the reader is mark supported. Syntax: public boolean markSupported() Parameters: This method does not accepts any parameters Return Value: 2 min read Reader markSupported() method in Java with Examples The markSupported() method of Reader Class in Java is used to check whether this Reader is supports mark() operation or not. It returns a boolean which states if the reader is mark supported. Syntax: public boolean markSupported() Parameters: This method does not accepts any parameters Return Value: 2 min read PushbackReader markSupported() method in Java with Examples The markSupported() method of PushbackReader Class in Java is used to check whether this PushbackReader is supports mark() operation or not. It returns a boolean which states if the reader is mark supported. Syntax: public boolean markSupported() Parameters: This method does not accepts any paramete 2 min read PushbackReader markSupported() method in Java with Examples The markSupported() method of PushbackReader Class in Java is used to check whether this PushbackReader is supports mark() operation or not. It returns a boolean which states if the reader is mark supported. Syntax: public boolean markSupported() Parameters: This method does not accepts any paramete 2 min read StringReader mark(int) method in Java with Examples The mark() method of StringReader Class in Java is used to mark the stream as the checkpoint from where the stream read will start, once reset() is called. This method is not supported by all subclasses of StringReader class. Syntax: public void mark(int readAheadLimit) Parameters: This method accep 3 min read StringReader mark(int) method in Java with Examples The mark() method of StringReader Class in Java is used to mark the stream as the checkpoint from where the stream read will start, once reset() is called. This method is not supported by all subclasses of StringReader class. Syntax: public void mark(int readAheadLimit) Parameters: This method accep 3 min read Like