Categories
Core JAVA

Uses of Super keyword in java

Working with super keyword:- Super keyword in java which can be used to solve 3 different problems. Super always refers to parent class object. superkeyword in Java is a reference variable that is used to refer parent class objects Super keyword only can be placed within a non-static method or nonstatic block or constructor. Whenever […]

Categories
Operating System

Peterson’s solution

Peterson’s solution:- Peterson’s solution is a software based solution to the critical section problem. Consider two processes P0 and P1. For convenience, when presenting Pi, we use Pi to denote the other process; that is, j == 1 – i. The processes share two variables: boolean flag [2] ; int turn; Initially flag [0] = […]

Categories
C

Operator in C

Operator in C:- Operator in C :- 1) Precedence and associativity of an operator only implemented if it is represented in INFIX notation. Precedence decides which operation will be performed first. Associativity decides the order of evaluation ( left to right or right to left) if more than one operator enjoy the same precedence. The […]

Categories
C

DataType in C

Datatype in C:- Data type Size (Bytes) Range Format Specifiers Char 1 – 128 to 127 %c Unsigned char 1 0 to 255 %c Short or int 2 – 32,768 to z32, 767 %i or %d Unsigned int 2 0 to 655355 %u Float 4 3.4e – 38 to +3.4e +38 %f or %g Long […]

Categories
C

Structure Of  C Program

STRUCTURE OF C PROGRAM:- In this post, we will learn about the Structure Of  C Program. Following are the basic Structure Of  C Program Include header file section Global declaration section main() { Declaration statement Executable statement } User-defined functions { Statements } Include Header File Section C program always depends upon some header files […]

Categories
C

Interesting facts about C Program

Interesting facts about C Program:- The Interesting facts about C Program are When you purchase a computer directly from the manufacturer, is like a dead body, and one has to give life to it, by feeding something ( software) to enable it to perform the desired function, that specific software is designed in C language. If you […]

Categories
C

What is C Language and its Important

C Language and it’s Important:- C Language and its Important:- The C Programming Language is an enigma that numerous of its practitioners have been trying to unravel in its entirety since its very inception. But like a mystery, the secrets and possibilities of C keep on surprising every one till date. Hence it would be […]

Categories
Core JAVA

Uses Of this keyword in java

Working with “this” keyword:- This keyword in java is a keyword which always refers to a current class object.T he difference between ‘new’ and ‘this’ is new is responsible to call a  constructor and create a new object. Whereas “this” is responsible to call the constructor without allocating memory. this keyword can be very useful in the handling of […]

Categories
Operating System

The Critical Section Problem

The critical section problem Consider a system consisting of n processes {Po, P1, …, Pn-1). Each process has a segment of code, called a critical section problem, in which the process may be changing common variables, updating a table, writing a file, and so on. The important feature of the system is that, when one […]

Categories
Core JAVA

Upcasting and Downcasting in java

Upcasting and Downcasting:- (Upcasting and Downcasting ) Java support Run-time polymorphism with the help of method overriding. Method overriding only applicable when the signature (prototype, return type, name, argument) of the superclass is the same as the subclass method, then it is known as method overriding. Dynamic method dispatch allows Java to support overriding of methods […]

Categories
Core JAVA

Polymorphism in JAVA

Polymorphism in Java:- Polymorphism in Java is an object-oriented concept which is used to create different from a single resource. The polymorphism can be achieved by two different ways in java:- with the help of overloading that is known as compile time polymorphism. with the help of overriding, that is known as runtime polymorphism.   […]

Categories
Operating System

Producer Consumer Problem

Producer Consumer Problem:- The paradigm for cooperating processes, producer process produces information that is consumed by a consumer process. To allow producer and consumer processes to run concurrently, we must have available a buffer of items that can be filled by the producer and emptied by the consumer. A producer can produce one item while […]

Categories
Operating System

Message Passing System

Message Passing System:- The function of a message passing system is to allow processes to communicate with one another without the need to resort to shared data. We have already seen message passing used as a method of communication in microkernels. In this scheme, services are provided as ordinary user processes. That is, the services […]

Categories
Operating System

Concurrent Processes

Concurrent Processes The concurrent processes executing in the operating system may be either independent processes or cooperating processes. A process is independent if it cannot affect or be affected by the other processes executing in the system. Clearly, any process that does not share any data (temporary or persistent) with any other process is independent. […]

Categories
Core JAVA

What is interface in JAVA ?

  Interface in JAVA:- An interface in Java is very similar to an abstract class. Both cannot be instantiated. It is similar to a class. It is a collection of abstract methods. The interface in java is a mechanism to achieve abstraction. Java Interface represents the IS-A relationship. The benefit of using interfaces is that they […]