Java Coaching Centre

Java Coaching Centre JCC has a well trained experts who has a experience over 15 years in world leading Multinational Comp

20/08/2021

What is Single Page Application (SPA)?

20/08/2021

Angular is a JavaScript framework which makes you able to create reactive Single Page Applications (SPAs). Angular is completely based on components. It consists of several components which forms a tree structure with parent and child components.

20/08/2021

Functional Interface in Java 8:

A functional interface is an interface that contains only one abstract method. They can have only one functionality to exhibit.

interface MyInterface {
void test(); // Abstract method
}

20/08/2021

Promise can be access in below way:

Syntax:then(function(result){
//This function is called when resolve() is called.
}, function(error){
//This function is called when reject() is called.
})

In this way of accessing the promise, .then() is invoked when a promise is either resolved or rejected. then() method takes two functions as parameters. First function is executed if promise is resolved and a result is received. Second function is executed if promise is rejected and an error is received.

Promise Resolved Example ::
var promise = new Promise(function(resolve, reject) {
resolve("Java Learning Centre");
})

promise
.then(function(successMessage) {
//This function is invoked now.
console.log(successMessage);
}, function(errorMessage) {
console.log(errorMessage);
})

Promise Rejected Example ::
var promise = new Promise(function(resolve, reject) {
reject("Promise Rejected here")
})

promise
.then(function(successMessage) {
console.log(successMessage);
}, function(errorMessage) {
//This error handler function is invoked.
console.log(errorMessage);
})

20/08/2021

Example of Create Promise:
var promise = new Promise(function(resolve, reject) {
//Assume that, two variables x and y has same values.
//If two variables values are same, call resolve(), if not calls reject().
const x = "india";
const y = "india"
if(x === y) {
resolve();
} else {
reject();
}
});

//Below is the way to register for promise
promise.
then(function () {
console.log('Success, Two variables x and y has same values');
}).
catch(function () {
console.log('Variables x and y has different values');
});

When resolve() is called, will be called and promise.then() will be executed.
If reject() is called, promise.catch() will be executed.

20/08/2021

Promises are used to handle asynchronous operations in JavaScript. Promises are the ideal choice for handling asynchronous operations in the simplest manner. They can handle multiple asynchronous operations easily and provide better error handling.

A promise can be created in fallowing way:
var promise = new Promise(function(resolve, reject){
//do something
});

Note:
1. Promises are used for asynchronous handling of events.
2. Promises are used to handle asynchronous http requests.

16/08/2021

Infinite loops run infinitely without break condition.
Some examples of Infinite loops are:

1. Using for loop :

for (;;)
{
// Business logic
// Any break logic
}

2. Using while loop:

while(true){
// Business logic
// Any break logic
}

3.Using do-while loop:

do{
// Business logic
// Any break logic
}while(true);

16/08/2021

What is promise in javascript?

Real-time communication for Web applicationsWith WebRTC, you can add real-time communication capabilities to your web ap...
16/08/2021

Real-time communication for Web applications

With WebRTC, you can add real-time communication capabilities to your web applications. It supports video, voice, and generic data to be sent between peers, allowing developers to build powerful voice- and video-communication solutions.
It establishes a peer to peer connections using signaling server. Once the connection established between peers, two browsers will communicate directly without going through server. Using WebRTC, we can add video and audio calling, messaging and data transferring features to the web and mobile applications.
Since it is connected directly between the browsers, by bypassing the server, the video, audio, messaging or data transferring is very fast.
Using WebRTC, we can develop video/audio calling feature like facebook, Whatsup etc.



Architecture of WebRTC looks like below:

14/08/2021

How to create video calling application using MEAN stack?

14/08/2021

Angular Framework has below key components:

1. Component: These are the basic building blocks of
angular application to control HTML views.

2. Modules: An angular module is set of angular basic
building blocks like component, directives, services
etc. An application is divided into logical pieces and
each piece of code is called as "module" which
perform a single task.

3. Templates: This represent the views of an Angular application.
Services: It is used to create components which can
be shared across the entire application.
4. Metadata: This can be used to add more data to an Angular
class.

Angular Architecture
14/08/2021

Angular Architecture

Address

Nagappa Street, Palace Guttahalli, Sheshadripuram, Near Malleswaram Circle And Fortis Hospital
Bangalore
560092

Telephone

+918639904700

Website

Alerts

Be the first to know and let us send you an email when Java Coaching Centre posts news and promotions. Your email address will not be used for any other purpose, and you can unsubscribe at any time.

Contact The Business

Send a message to Java Coaching Centre:

Share