objects

JavaScript Destructuring, Spread and Rest Operators Explained with Examples

Submitted by jaypabs on

If you have read modern JavaScript code, in React components, Node.js APIs or even in the browser console, you have probably seen lines like const { name, email } = user; or [...items, newItem]. Those three dots and curly braces are destructuring, the spread operator and rest parameters. They were added in ES6 (ECMAScript 2015) and ES2018, and today they appear in almost every JavaScript project.

Saving the Objects in Java

Submitted by mehfuza on
Our programs reside on Hard Disk. Every program is brought into Main memory(RAM) for execution. Variables, Objects are runtime entity which means they are saved in RAM. Once you run the Program, variables, objects come into existence but once we close our program they are deleted from the Main Memory. In order to save the state(instance variable) of objects they must be saved on Secondary Memory(Hard Disk). Following are steps for serializing(saving) the objects.