{"id":1300,"date":"2021-07-22T06:30:53","date_gmt":"2021-07-22T06:30:53","guid":{"rendered":"https:\/\/usemynotes.com\/?p=1300"},"modified":"2023-01-22T14:48:17","modified_gmt":"2023-01-22T14:48:17","slug":"file-handling-in-java","status":"publish","type":"post","link":"https:\/\/usemynotes.com\/file-handling-in-java\/","title":{"rendered":"File Handling in Java"},"content":{"rendered":"<p>Hi guys, welcome back. In this module, I will be discussing <strong>file handling in Java Programming<\/strong>. After reading this module, you will get to know file handling operations in Java. Let\u2019s know about Java file handling without any further delay.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-1301 size-full\" title=\"File Handling in Java\" src=\"https:\/\/usemynotes.com\/wp-content\/uploads\/2021\/07\/file-handling-in-java.png\" alt=\"File Handling in Java\" width=\"1000\" height=\"700\" srcset=\"https:\/\/usemynotes.com\/wp-content\/uploads\/2021\/07\/file-handling-in-java.png 1000w, https:\/\/usemynotes.com\/wp-content\/uploads\/2021\/07\/file-handling-in-java-300x210.png 300w, https:\/\/usemynotes.com\/wp-content\/uploads\/2021\/07\/file-handling-in-java-768x538.png 768w, https:\/\/usemynotes.com\/wp-content\/uploads\/2021\/07\/file-handling-in-java-150x105.png 150w, https:\/\/usemynotes.com\/wp-content\/uploads\/2021\/07\/file-handling-in-java-696x487.png 696w, https:\/\/usemynotes.com\/wp-content\/uploads\/2021\/07\/file-handling-in-java-600x420.png 600w, https:\/\/usemynotes.com\/wp-content\/uploads\/2021\/07\/file-handling-in-java-100x70.png 100w\" sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_80 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 eztoc-toggle-hide-by-default' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/usemynotes.com\/file-handling-in-java\/#File_Handling_in_Java\" >File Handling in Java<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/usemynotes.com\/file-handling-in-java\/#What_is_a_Stream_in_Java\" >What is a Stream in Java?<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/usemynotes.com\/file-handling-in-java\/#Byte_stream_in_Java_Programming\" >Byte stream in Java Programming<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/usemynotes.com\/file-handling-in-java\/#Character_stream_in_Java_Programming\" >Character stream in Java Programming<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/usemynotes.com\/file-handling-in-java\/#What_are_the_File_class_methods_in_Java\" >What are the File class methods in Java?<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/usemynotes.com\/file-handling-in-java\/#canRead_methods_in_Java\" >canRead() methods in Java<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/usemynotes.com\/file-handling-in-java\/#canWrite_methods_in_Java\" >canWrite() methods in Java<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/usemynotes.com\/file-handling-in-java\/#exists_methods_in_Java\" >exists() methods in Java<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/usemynotes.com\/file-handling-in-java\/#createNewFile_methods_in_Java\" >createNewFile() methods in Java<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/usemynotes.com\/file-handling-in-java\/#delete_methods_in_Java\" >delete() methods in Java<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/usemynotes.com\/file-handling-in-java\/#getName_methods_in_Java\" >getName() methods in Java<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/usemynotes.com\/file-handling-in-java\/#list_methods_in_Java\" >list() methods in Java<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/usemynotes.com\/file-handling-in-java\/#length_methods_in_Java\" >length() methods in Java<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/usemynotes.com\/file-handling-in-java\/#mkdir_methods_in_Java\" >mkdir() methods in Java<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/usemynotes.com\/file-handling-in-java\/#What_are_the_file_operations_in_Java\" >What are the file operations in Java?<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/usemynotes.com\/file-handling-in-java\/#Creating_a_file_in_Java\" >Creating a file in Java<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/usemynotes.com\/file-handling-in-java\/#Writing_data_to_a_file_in_Java\" >Writing data to a file in Java<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"https:\/\/usemynotes.com\/file-handling-in-java\/#Reading_from_a_file_in_Java\" >Reading from a file in Java<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-19\" href=\"https:\/\/usemynotes.com\/file-handling-in-java\/#Deleting_a_file_in_Java\" >Deleting a file in Java<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-20\" href=\"https:\/\/usemynotes.com\/file-handling-in-java\/#Getting_file_information_in_Java\" >Getting file information in Java<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-21\" href=\"https:\/\/usemynotes.com\/file-handling-in-java\/#How_to_write_a_Java_program_to_find_odd_or_even_numbers_using_a_byte_array_stream_in_file_handling\" >How to write a Java program to find odd or even numbers using a byte array stream in file handling?<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"File_Handling_in_Java\"><\/span>File Handling in Java<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>File handling in Java is an essential part of any programming language. Using files, a program can store data on a storage device. To perform various actions on a file, such as reading, writing, and so on, file handling is required.<\/p>\n<p><strong>file handling in Java<\/strong> is defined as reading from a file and writing to a file. We can use the File class in <a href=\"https:\/\/usemynotes.com\/java-programming\/\">Java<\/a> to create a file object. The package java.io contains a File class to work and handle different formats of files. If you want to use the File class, you need to create an object of the File class and provide the name of the file or pathname. Using file class we can access metadata of files such as file name, file size, permissions, type of file, etc.<\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\/\/ importing all the classes of java.io\r\nimport java.io.*;\r\nclass FileHandle {\r\n    public static void main(String&#x5B;] arr) {\r\n       \/\/ an object of File class is created.\r\n       File f=new File(&quot;demo.txt&quot;);\r\n}\r\n}<\/pre>\n<p><strong>Note<\/strong>: You can give an absolute pathname if you are not in the current working directory.<\/p>\n<p>You can also use import java.io.File instead of using import java.io.* to import the File class in Java. Now, let\u2019s know about streams because Java uses Streams to perform input-output (I\/O) operations on a file.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"What_is_a_Stream_in_Java\"><\/span>What is a Stream in Java?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>A stream in Java is a sequence of data. It is also defined as a sequence of bytes. It can be used to represent either an input source or a destination. The source and destination can be disk files, <a href=\"https:\/\/usemynotes.com\/what-are-arrays-in-java\/\">arrays<\/a>, text files, etc. The input stream reads or retrieves data from a source, whereas the output stream writes data to a destination. There are two types of streams:<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Byte_stream_in_Java_Programming\"><\/span>Byte stream in Java Programming<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Byte Stream is used to perform read and write operations with byte data. A byte stream file handling in Java process is defined as when the given input is executed using byte data. There are many classes provided related to byte streams but the most often used classes are <strong>FileInputStream<\/strong> and <strong>FileOutputStream<\/strong>.<\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">import java.io.*;\r\npublic class FileHandle{\r\n   public static void main(String &#x5B;]arr) throws IOException{\r\n   FileInputStream fin=new FileInputStream(&quot;source_file.txt&quot;);\r\n   FileOutputStream fout=new FileOutputStream(&quot;destination_file.txt&quot;);\r\n   int character;\r\n   while((character=fin.read())!=-1)\r\n   {\r\n      System.out.print((char)character);\r\n      \/\/ writing to destination file\r\n      fout.write((char)character);\r\n   }\r\n   \/\/ closing source_file.txt\r\n   fin.close();\r\n   \/\/ closing destination_file.txt\r\n   fout.close();\r\n }\r\n}<\/pre>\n<p>In the above example, we are reading data from the source file and writing data to a destination. -1 indicates the end of the file. So, reading from the source file will be stopped when -1 is encountered.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Character_stream_in_Java_Programming\"><\/span>Character stream in Java Programming<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Character Stream in Java programming is used to perform read and write operations with character data. The file-handling process with a character stream is the process of executing input data with characters. There are many character stream classes available, but the most commonly used classes include FileWriter and FileReader.<\/p>\n<p>Now, let\u2019s discuss some of the File class methods in Java Programming.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"What_are_the_File_class_methods_in_Java\"><\/span>What are the File class methods in Java?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li>\n<h3><span class=\"ez-toc-section\" id=\"canRead_methods_in_Java\"><\/span>canRead() methods in Java<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>This file class method checks whether the file is readable or not and returns a Boolean value i.e., true or false.<\/li>\n<li>\n<h3><span class=\"ez-toc-section\" id=\"canWrite_methods_in_Java\"><\/span>canWrite() methods in Java<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>This is a file class method that checks whether the file is writable or not and returns a Boolean value i.e., true or false.<\/li>\n<li>\n<h3><span class=\"ez-toc-section\" id=\"exists_methods_in_Java\"><\/span>exists() methods in Java<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>It is a file class method used to check whether the given file is present or not and returns a boolean value.<\/li>\n<li>\n<h3><span class=\"ez-toc-section\" id=\"createNewFile_methods_in_Java\"><\/span>createNewFile() methods in Java<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>When we want to create a new empty file, use this file class method. It returns a Boolean value.<\/li>\n<li>\n<h3><span class=\"ez-toc-section\" id=\"delete_methods_in_Java\"><\/span>delete() methods in Java<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>It is a file class method used for deleting a file and returns a Boolean value.<br \/>\ngetAbsolutePath()<br \/>\nThis method is used to return the absolute pathname of the file.<\/li>\n<li>\n<h3><span class=\"ez-toc-section\" id=\"getName_methods_in_Java\"><\/span>getName() methods in Java<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>It is a method used to return a string value which is the name of the file.<\/li>\n<li>\n<h3><span class=\"ez-toc-section\" id=\"list_methods_in_Java\"><\/span>list() methods in Java<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>It returns an array of strings representing all the files in the directory.<\/li>\n<li>\n<h3><span class=\"ez-toc-section\" id=\"length_methods_in_Java\"><\/span>length() methods in Java<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>This method of the file class returns the file&#8217;s size in bytes.<\/li>\n<li>\n<h3><span class=\"ez-toc-section\" id=\"mkdir_methods_in_Java\"><\/span>mkdir() methods in Java<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>It is a method of file class that is used to create a new directory.<\/li>\n<\/ul>\n<p>Let&#8217;s look at the various file operations available in Java and how to use them.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"What_are_the_file_operations_in_Java\"><\/span>What are the file operations in Java?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>In Java file handling, we can do the following operations on a file:<\/p>\n<ol>\n<li>Creating a file<\/li>\n<li>Writing data to a file<\/li>\n<li>Reading data from a file<\/li>\n<li>Deleting a file<\/li>\n<li>Getting information of a file<\/li>\n<\/ol>\n<h3><span class=\"ez-toc-section\" id=\"Creating_a_file_in_Java\"><\/span>Creating a file in Java<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>In Java, we can create a file using the createNewFile() method of the File class. This method returns true if the file is created, otherwise, false is returned if the file already exists.<\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">import java.io.*;\r\npublic class FileHandle{\r\n   public static void main(String &#x5B;]arr) throws IOException{\r\n   \/\/ an object of file class\r\n   File f=new File(&quot;demo.txt&quot;);\r\n   \/\/ creating a new file\r\n   Boolean result=f.createNewFile();\r\n   if(result)\r\n      System.out.print(f+&quot; created successfully.&quot;);\r\n   else\r\n      System.out.format(&quot;%s&quot;,&quot;File cannot be created due to some error.&quot;);\r\n }\r\n}<\/pre>\n<h3><span class=\"ez-toc-section\" id=\"Writing_data_to_a_file_in_Java\"><\/span>Writing data to a file in Java<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>The write operation on a file means storing the data in a file. To perform write operations on a file, we will use the write() method along with the FileWriter class. We should use the close() method to close the stream to retrieve the allocated resources.<\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">import java.io.*;\r\npublic class FileHandle{\r\n   public static void main(String &#x5B;]arr) throws IOException{\r\n     \/\/ creating a new file and writing data to a file\r\n     FileWriter fw=new FileWriter(&quot;demo.txt&quot;);\r\n     String s=&quot;Welcome, this is tutorial of Java File Handling in Java.&quot;;\r\n     fw.write(s);\r\n     \/\/ closing a file\r\n     fw.close();\r\n   }\r\n}<\/pre>\n<h3><span class=\"ez-toc-section\" id=\"Reading_from_a_file_in_Java\"><\/span>Reading from a file in Java<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>The read operation means accessing or retrieving the data stored from a file. To perform a write operation on a file, we will use the Scanner class along with the hasNextLine() and nextLine() methods to retrieve data from a file. We should use the close() method to close the stream.<\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">import java.io.*;\r\nimport java.util.Scanner;\r\npublic class FileHandle{\r\n   public static void main(String &#x5B;]arr) throws IOException{\r\n     File f=new File(&quot;demo.txt&quot;);\r\n     Scanner sc=new Scanner(f);\r\n     while(sc.hasNextLine())\r\n     {\r\n       String str=sc.nextLine();\r\n       System.out.println(str);\r\n     }\r\n     \/\/ closing a file\r\n     sc.close();\r\n   }\r\n}<\/pre>\n<h3><span class=\"ez-toc-section\" id=\"Deleting_a_file_in_Java\"><\/span>Deleting a file in Java<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>In file handling in Java, we can delete a file using the delete() method of the File class.<br \/>\nThere is no need to close the file using close() because neither the FileWriter nor the Scanner classes are used to delete a file.<\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">import java.io.*;\r\npublic class FileHandle{\r\n   public static void main(String &#x5B;]arr) throws IOException{\r\n      File f=new File(&quot;demo.txt&quot;);\r\n      Boolean result=f.delete();\r\n      if(result)\r\n         System.out.print(f+&quot; deleted successfully.&quot;);\r\n      else\r\n         System.out.format(&quot;%s&quot;,&quot;File cannot be deleted due to some error.&quot;);\r\n   }\r\n}<\/pre>\n<h3><span class=\"ez-toc-section\" id=\"Getting_file_information_in_Java\"><\/span>Getting file information in Java<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>There are few methods in Java that I have discussed earlier at methods of file class to get the information of the file.<\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">import java.io.*;\r\npublic class FileHandle{\r\n   public static void main(String &#x5B;]arr) throws IOException{\r\n     File file=new File(&quot;demo.txt&quot;);\r\n     file.createNewFile();\r\n     String filename=file.getName();\r\n     System.out.println(&quot;File Name is &quot;+filename);\r\n     System.out.println(&quot;Absolute path of &quot;+filename+&quot; : &quot;+file.getAbsolutePath());\r\n     System.out.print(&quot;length of &quot;+filename+&quot; : &quot;+file.length());\r\n     System.out.println(&quot;Is &quot;+filename+&quot; readable? &quot;+file.canRead());\r\n     System.out.println(&quot;Is &quot;+filename+&quot; writable? &quot;+file.canWrite());\r\n     System.out.println(&quot;Is &quot;+filename+&quot; exists? &quot;+file.exists());\r\n  }\r\n}<\/pre>\n<p>Now, let\u2019s see one Java program to find whether a number is even or odd using a byte array stream in file handling in Java Programming.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"How_to_write_a_Java_program_to_find_odd_or_even_numbers_using_a_byte_array_stream_in_file_handling\"><\/span>How to write a Java program to find odd or even numbers using a byte array stream in file handling?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>We will be using ByteArrayInputStream class to write the given program. In Java, a ByteArrayInputStream contains a buffer that is used to read a byte array as an input stream. The package java.io provides the ByteArrayInputStream class. Given below is the code to check for even or odd numbers.<\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">import java.io.*;\r\npublic class FileHandle{\r\n   public static void main(String &#x5B;]arr) throws IOException{\r\n     byte &#x5B;]buffer={10,40,81,23,32,100,57};\r\n     ByteArrayInputStream by=new ByteArrayInputStream(buffer);\r\n\r\n     int character=0;\r\n     while((character=by.read())!=-1)\r\n     {\r\n        int number=character;\r\n        if(number%2==0)\r\n          System.out.println(number+&quot; is an even number.&quot;);\r\n        else\r\n          System.out.println(number+&quot; is an odd number.&quot;);\r\n     }\r\n   }\r\n}<\/pre>\n<p>I hope this module might be useful for you to understand <strong>file handling in Java programming<\/strong>. You should try to implement all the methods of file and operations by yourself to gain a better understanding. Keep in touch with us for more informative modules like this. Keep practising!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi guys, welcome back. In this module, I will be discussing file handling in Java Programming. After reading this module, you will get to know file handling operations in Java. Let\u2019s know about Java file handling without any further delay. File Handling in Java File handling in Java is an essential part of any programming [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1301,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":{"0":"post-1300","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-java-programming"},"_links":{"self":[{"href":"https:\/\/usemynotes.com\/wp-json\/wp\/v2\/posts\/1300","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/usemynotes.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/usemynotes.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/usemynotes.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/usemynotes.com\/wp-json\/wp\/v2\/comments?post=1300"}],"version-history":[{"count":0,"href":"https:\/\/usemynotes.com\/wp-json\/wp\/v2\/posts\/1300\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/usemynotes.com\/wp-json\/wp\/v2\/media\/1301"}],"wp:attachment":[{"href":"https:\/\/usemynotes.com\/wp-json\/wp\/v2\/media?parent=1300"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/usemynotes.com\/wp-json\/wp\/v2\/categories?post=1300"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/usemynotes.com\/wp-json\/wp\/v2\/tags?post=1300"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}