In java proramming handling exceptional circumstances.
In java programming handling exceptional circumstances.
As programmers we should handle these cases in order to present user interactions with users and let the program continues normally, instead of leaving programing crashed or die, its called "EXCEPTION HANDLING".
Here we see the simple program of java : Exception Handling , using TRY & CATCH blocks.
SAVE this program same name of class - Example : Exception.java (java is extension).
// declaring the class name
class Exception
{
// main method ,and commad line arguments storage in string class.
public static void main(String args[])
{
// variables declaration
int a,b, ans;
try
{
// passing value in interger value from command line argument and storage variable a
a=Integer.parseInt(args[0]);
// passing value in interger value from command line argument and storage variable b
b=Integer.parseInt(args[1]);
try
{
//arithmentic operations and calculations store value in the ans variable.
ans = a/b;
System.out.println(" Anser Is :"+ans); // display value of ans variable.
}
catch(ArithmeticException e) // if any exception in arithmeticException than passing this catch block.
{
System.out.println(" Divided by Zero"); // display message of exception of arithmetic exception.
}
}
catch(NumberFormatException e) // if any exception of invalid of inpur value than passing this catch block.
{
System.out.println(" Invalid value entered"); // display message of invalid value entered.
}
}
}
above programe output as below can from different type of value entered with arithmetic and invalid value.
here we have seen simple programe using nested try-catch blocks.
exception handing use when errors come to run time when input value and any logical error generates that time programe terminates and close and not execution next statement, using exception handling we can pass errors and run all statements in programs.
If you get this, then share with your friends. And if you have query, contact-me and give comment
COMMENT! SHARE.
Exception Handling
Always, A Program doesn't run easly during its lifetime. Sometimes need to be handling unexpected errors in programs. many times user entered invalid inputs , networks connection drops, database fetching down and storage full, etc. such case as are referred as exception. which are programing stop execution normally.As programmers we should handle these cases in order to present user interactions with users and let the program continues normally, instead of leaving programing crashed or die, its called "EXCEPTION HANDLING".
Here we see the simple program of java : Exception Handling , using TRY & CATCH blocks.
SAVE this program same name of class - Example : Exception.java (java is extension).
// declaring the class name
class Exception
{
// main method ,and commad line arguments storage in string class.
public static void main(String args[])
{
// variables declaration
int a,b, ans;
try
{
// passing value in interger value from command line argument and storage variable a
a=Integer.parseInt(args[0]);
// passing value in interger value from command line argument and storage variable b
b=Integer.parseInt(args[1]);
try
{
//arithmentic operations and calculations store value in the ans variable.
ans = a/b;
System.out.println(" Anser Is :"+ans); // display value of ans variable.
}
catch(ArithmeticException e) // if any exception in arithmeticException than passing this catch block.
{
System.out.println(" Divided by Zero"); // display message of exception of arithmetic exception.
}
}
catch(NumberFormatException e) // if any exception of invalid of inpur value than passing this catch block.
{
System.out.println(" Invalid value entered"); // display message of invalid value entered.
}
}
}
above programe output as below can from different type of value entered with arithmetic and invalid value.
here we have seen simple programe using nested try-catch blocks.
exception handing use when errors come to run time when input value and any logical error generates that time programe terminates and close and not execution next statement, using exception handling we can pass errors and run all statements in programs.
If you get this, then share with your friends. And if you have query, contact-me and give comment
COMMENT! SHARE.
Vivo V17 Pro Smartphone Dual Pop Camera Launched Out !
Vivo V17 Pro is powered by 4100mAH non-removable battery with a Quick charging support.
It's included 48 MP Rear Camera and 32 MP Front Camera. System connection options on the Vivo V17 Pro including Bluetooth v5.00, USB Type-C, Wifi-802.11b/g/n/ac, USB OTG, GPS, Dual Sim (Nano Sim and Nano Sim Cards allow with both 4G networks supported).
Vivo V17 Pro is runs OS 9.1 PIE android version, Storage is 128GB inbuilt . RAM is available 8GB , Process included 2GHz Octa Core Qualcomm Snapdragon 675.
Sensors availability of ambient light sensor, proximity sensor, fingerprint sensor, gyroscope, accelerometer, face unlock system.
Bears a glass body with weight 202.00grams. Currently price of VivoV17 Pro (Midnight Ocean, 8GB RAM, 128GB Storage) starting with Rs,29,990 (Amazon ) near about.
For More information about Vivo V17 Pro Click Here.
JAVA PERMISSION CLASSES !
The Java programming language is a state-of-the-art, object-oriented language that has a syntax similar to that of C.
The Java platform is just as important as the Java programming language and the Java Virtual Machine. All programs written in the Java language rely on the set of predefined classes.
Some important Permission classes by the core Java platform and summarizes the permissions they represent.
Here Below Table about Permission classes and there Descriptions showing.
Permission
class
|
Description
|
java.security.AllPermission
|
An instance of this special
permission class implies all other permissions.
|
javax.sound.sampled.AudioPermission
|
Controls the ability to play and
record sound.
|
javax.security.auth.AuthPermission
|
Controls access to authentication
methods in javax.security.auth and its subpackages.
|
java.awt.AWTPermission
|
Controls access to sensitive
methods in java.awt and its subpackages.
|
java.io.FilePermission
|
Governs access to the filesystem.
|
java.util.logging.LoggingPermission
|
Controls the ability of a program
to modify the logging configuration.
|
java.net.NetPermission
|
Governs access to
networking-related resources such as stream handlers and HTTP authentication.
See also java.net.SocketPermission.
|
java.util.PropertyPermission
|
Governs access to system
properties.
|
java.lang.reflect.ReflectPermission
|
Governs access through the java.lang.reflect package to classes and class members that would normally
be inaccessible.
|
java.lang.RuntimePermission
|
Governs access to a number of
methods and resources. Many of the controlled methods are defined by java.lang.System and java.lang.Runtime.
|
java.security.SecurityPermission
|
Governs access to various
security-related methods.
|
java.io.SerializablePermission
|
Governs access to
serialization-related methods.
|
java.net.SocketPermission
|
Governs access to the network.
|
java.sql.SQLPermission
|
The classes of the Java platform are collected into related groups, known as
packages. Most programs manipulate text in one form or another, and the Java platform
defines a number of important classes and interfaces for representing,
formatting, and scanning text.
In the table There Some Classes Display. there is more available to use of security enhancement. Jave Permission Classes need to security of clients and users to data protection.
In the table There Some Classes Display. there is more available to use of security enhancement. Jave Permission Classes need to security of clients and users to data protection.
LIKE ! COMMENT! SHARE
FACEBOOK STORED MILLIONS OF USERS PASSWORD IN PLAIN TEXT.
Millions of Facebook user account password stored in plaintext and easy searchable by thousands of Facebook employees.
where Facebook is probing a series of security failures in which employees built applications that singed unsecured password data for Facebook users and stored internal company server in plaintext.
Here is discovering bugs out from the Facebook there is uses hundreds millions of users account password where searchable stored in Facebook internal server where thousand Facebook employees finding them, and it's bugs from internal investigating and primary reported by KOS.
Facebook said that it hashes and encrypts passwords, but it's how done of hundreds of millions of accounts password in plain text in internal company server stored.
where twitter given advised of millions users to change their password, after big bugs discovering password stored in plain text.
Facebook said "in security terms, we 'hash' and 'salt' the passwords, with using a function called "scrypt" as well as a cryptographic key that lets us irreversibly replace your actual password with a random set of characters,".
We Advised : "Be Secure and Be Careful."
COMMENT! & SHARE :)
New Features update in "Office Insiders"
As we all are working with Microsoft office. Now a day its latest features available to easy work. Microsoft update OFFICE 365 features.
If you are an office insider enrolled in packages channels level, so continue to reading of this new version 1902(build 11328.20070).
More changes as they happen.
Updated in - Words. Excel. PowerPoint
Creating an online video is easier from past.
If you are using powerpoint then it will be easy for inserting video for you to creating online video. It's work in slide to put videos links to open it.
Updated in - . PowerPoint
Change in hard- drawn math formula(expressions) into stand characters.
Using PowerPoint to presentation is easy. For you here that Microsoft added feature to hard-drawn math expressions writer into standard character. You need to choose ink to math and select handwritten notes to start it.
Updated in - . PowerPoint
Updated in - . PowerPoint
Securely LinkedIn account to Outlook(Microsoft account)
Microsoft Office added outlook feature to securely connect to LinkedIn account and see information from LinkedIn profile directly from the peoplecard in windows outlook.
Updated in : Outlook
Updated in : Outlook
Live subtitle and captions added in PowerPoint to make more inclusive presentations.
If you giving live presentation using PowerPoint at that time this feature will use for the caption and subtitle of your words from headset of microphone automatically change in to another language that you set. It show on the screen as captions.
Updated in : PowerPoint
LIKE ! COMMENT! SHARE










