Monday 7 November 2016

Which Non Access Modifier can be used which Non Access Modifier?





In Nutshell:
  • abstract cannot be used with any other Non Access Modifier
  • final can be used with all other Non Access Modifier except abstract
  • synchronized can be used with all other Non Access Modifier except abstract
  • native can be used with all other Non Access Modifier except abstract, strictfp
  • strictfp can be used with all other Non Access Modifier except abstract, native
  • static can be with all other Non Access Modifier except abstract

Tuesday 1 November 2016

How to kill a task using command prompt in windows?

To kill a task using command prompt follow these steps:

  • Click start button and write cmd
  • Right click cmd.exe and click Run as administrator.
  • Now write:
tasklist /FI "sessionname eq Console"  

List of running tasks will appear.

  • Now write:
taskkill /F /IM <name of task>

For example: To kill all internet explorer processes write:

taskkill /F /IM iexplorer.exe

This will help you to kill one task at a time. If you want to kill all tasks then create a .bat file with following content:

@echo off
title Kill all running apps 
cd c:windowsSystem32
for /f "skip=3 tokens=1" %%i in ('
tasklist /FI "sessionname eq Console"  ') do (
if not "%%i"=="svchost.exe"   (
if not "%%i"=="explorer.exe" (
if not "%%i"=="cmd.exe"        (
if not "%%i"=="tasklist.exe"   (
if not "%%i"=="firefox.exe"    (
echo %%i
taskkill /f /im "%%i"

                                                 )
                                       )
                            )
                 )
        )
)
pause


 Now run the .bat file