WordPress database error: [Table './ay6u3nor6dat6ba1/kn6_ayu1n9k4_5_actionscheduler_actions' is marked as crashed and last (automatic?) repair failed]
SELECT a.action_id FROM kn6_ayu1n9k4_5_actionscheduler_actions a WHERE 1=1 AND a.hook='aioseo_send_usage_data' AND a.status IN ('in-progress') ORDER BY a.scheduled_date_gmt ASC LIMIT 0, 1

WordPress database error: [Table './ay6u3nor6dat6ba1/kn6_ayu1n9k4_5_actionscheduler_actions' is marked as crashed and last (automatic?) repair failed]
SELECT a.action_id FROM kn6_ayu1n9k4_5_actionscheduler_actions a WHERE 1=1 AND a.hook='aioseo_send_usage_data' AND a.status IN ('pending') ORDER BY a.scheduled_date_gmt ASC LIMIT 0, 1

know Java file extension | Loop and Break

know Java file extension

Files are usually known through their extensions. An extension differentiates the file from another file. It recognizes the file type. To find the extension from its file is a common task.

You can see in the give example, we have created an object of class File and specify a text file as an argument. The method getName() returns the name of the file. Then we have used substring() method to return a new string consists of file extension.

import java.io.*;

public class ExtensionJava {
	public static void main(String[] args) {
		File file = new File("file.txt");
		String fname = file.getName();
		String ext = fname.substring(fname.lastIndexOf('.') + 1, fname.length());
		System.out.println("Extension of file " + fname + " is: " + ext);
	}

}
Share

You may also like...