What is difference between wait and sleep methods? In the java interview, frequently asking is What is difference between wait and sleep methods? Let’s understand main differences between wait and sleep methods in the Thread class in this article. Differences between wait and sleep sleep(): is a static method and It sends current running thread […]
Day: January 9, 2016
How to detect Java and cookies whether enabled or not?
How to detect Java and cookies whether enabled or not? Most of the websites using cookies to store data in the temporary file and java. Suppose in the system where you are accessing application cookies are disabled then what will happen? The application will not store any data to handle the request so that end […]
How to detect the browser window size in JavaScript?
To determine the size of the browser window, use the following properties: in Internet Explorer (backward-compatibility mode): document.body.offsetWidth document.body.offsetHeight in Internet Explorer (standards mode, document.compatMode==’CSS1Compat’): document.documentElement.offsetWidth document.documentElement.offsetHeight in most other browsers – as well as IE9 (standards mode): window.innerWidth window.innerHeight (the page’s visible width/height) window.outerWidth window.outerHeight (the browser outer width/height) The following code sets the […]
How to detect browser details?
How to detect browser details? Each and every browsers(IE, Mozilla, Chrome, Safari etc….) having own properties and own setup. Then while creating website we need to check out cross browser. Some of the functionality in the website we have to write logic according the browser specific. Then how to detect browser details? Let’s us understand […]
How to detect operating system on the client machine?
How to detect operating system on the client machine? To detect the operating system on the client machine, your script can analyze the value of navigator.appVersion or navigator.userAgent. Below is a simple example of a script that sets the variable OSName to reflect the actual client OS. // This script sets OSName variable as follows: […]
Java keywords interview questions and answers
Java keywords interview questions and answers Here I am going to sharing some of the important and frequently asking Java keywords interview questions and answers. So before going to java interview, refresh your mind go through the following Java keywords interview questions and answers. What is use of synchronized keyword? This keyword is used to […]
Java basics interview questions and answers
Why should I choose Java software development? What are the Pros and Cons? Java Pros It’s free cost, download it and start creating application. Open source with quite large community base. Lots of available third party libraries, frameworks & IDE for fast development cycles(Spring, Hibernate, Struts, Eclipse, IntelliJ). Platform independent, write once run on most […]
How to run windows exe and bat files using java?
This is example of run exe and batch files from java code and catch response from them in java. Then create four java files in com.narayanatutorial.main package. RunExeMain.java RunWithParamMain.java RunBatchMain.java GetResponseMain.java 1) RunExeMain.java This file run exe file (Here cmd.exe) using java program. public class RunExeMain { //This is Example that display how to run […]
7-Zip Command-Line Examples In Java
7-Zip Command-Line Examples In Java The 7za.exe program is used to compress, extract and update files through the command line. It provides superior compression. It is a great program. The 7za.exe program commands will execute through java to make files compress with password protected and without password protected, extract and update the files in the […]







