Welcome to my blog !

Typescript How to implement constants property in a class| Typescript readonly

June 20, 2021 ·  2 min read

Class properties constants in typescript. Constants are fixed values, can not be modified once assigned with value. These can be declared in class like a member variables in any programming languages like java. But typescript does not allow class level constants. What will happen if class declares constants member variables. class Employee { const defaultValue = 10; calculate() { console.log(this.defaultValue); } } In The above class, with line constant declaration throws compile error A class member cannot have the ‘const’ ....

Learn XML and JSON basics with examples

June 20, 2021 ·  3 min read

In this blog post, We will discuss XML and JSON basics, pros/cons and also convert JSON to XML or XML to JSON in java. What is JSON ? JSON is abbreviated as javascript Object Notation. JSON is the independent format for exchanging data JSON is a simple format which contains key-pair values. JSON and XML are data formats used to transfer data between different systems of enterprise applications. JSON is lightweight and simple to read....

How to Convert JSON Object to Interface or class in typescript?

June 20, 2021 ·  4 min read

During development, data comes from rest API in the format of JSON format, So you need to write a code to convert the JSON to interface or class in typescript. This post talks about different ways of converting json to interface Contents How to Convert json to Object or interface Implicit interface conversion Explicit Interface conversion  Nested JSON object interface mapping Summary We are going to learn various ways of converting JSON objects to Interface/class....

Find out 32 bit or 64 bit java jdk version in Java

June 20, 2021 ·  3 min read

I have encountered one of the issues with java installation which is not compatible with my 32-bit machine. This blog post is helpful for check JVM version to install latest java version install. Check 32 bit or 64 bit for Java installation 32 bit is 4 bytes of size, whereas 64 bit is 8 bytes of size. That means 64 bit takes more memory than 32 machines. Most of the times, if your code complies with 32-bit JDK version, then you need to execute this class files in 32 bit machine/64 bit machine only....

Classes and Objects in Typescript| Constructor and Inheritance examples

June 20, 2021 ·  6 min read

In this tutorial, we are going to learn basics of the classes and objects in typescript programming language. In Any Object-oriented programming Object-oriented programming’s foundational elements are classes and objects. The data is stored in classes, and the behaviour or methods that operate on it are represented by methods. Typescript Class Class are introduced in the ES6 version of latest JavaScript. The same classes were also implemented with Typescript. The class serves as a model or template for newly created objects....

You'll get a notification every time a post gets published here.