Java Assertion is a pre-condition which checks for the program correctness at a specific code location. Coder will place these assertions at needed location of the program to check it meets certain requisites to go on with the rest of the code flow. In java, a condition which follows the assert keyword evaluates to true or false.
In the previous MFC Article, we examined how the Mapping Modes works while performing the drawing operation. In this example, we will see how we set the custom mapping modes. Our goal is below:
1) Set mapping mode so that the horizontal logical unit is 1 Centimeter (cm). Simply, 1 Unit = 1 cm in X axis.
2) Also, 1 Unit = 1 cm in Y Axis.
3) Positive X is towards left.
4) Positive Y is going Upwards.
5) The Drawing origin should be in screen center.
We can achieve the above goal by using the Custom Mapping mode MM_ISOTROPIC.
In Java there are many Exception types to handle a unique exception. There are groups like security related exceptions, file handling related exception and DB operation related exceptions, etc. If you want to handle an exception that is more exact to your business Logic, you can go for ‘Custom Exception’. Before we move on to the topic, let us learn Exception Category and this will help us decide what kind of exception we can create.
In java and modern OOPS language, an Exception moving from one method to other method is what we call as Exception Bubbling. In java, a method can call other method. The Called method can call one more method. These kinds of calling sequence continue and we can see all the methods in a call stack for a given point in time.
Method Level CAS (Code Access Security)
October 30, 2020
Executing SQL Stored Procedure in ADO.Net
October 9, 2020
Custom Mapping Mode in VC++ Via MM_ISOTROPIC
November 26, 2020
MFC Mapping Modes & Drawing Coordinate
September 7, 2020