Java Hyd Team
746 subscribers
986 photos
39 videos
670 files
690 links
https://teamhydteam.my.canva.site/

Can visit us on our website 😊
Still working on it 😊
Download Telegram
System.out.print("Enter N number ");
n = x.nextInt();
Calculation Thread = new Calculation();
Thread.start();
try{
Thread.join();}
catch(Exception e ){}
System.out.print("Sum "+Calculation.sum);
}
}
class Calculation extends Thread{
static int sum =0;
public void run(){
System.out.print("Calc Started ");
for(int i = 1 ; i<= Defaults.n ; i++){
Calculation.sum= Calculation.sum+i;
}
System.out.print("Calc ends ");
}
}
[9/30, 14:43] ENTREPRENEUR: // Thread synchronization


import java.util.*;
import java.lang.*;

public class Number{

static int x;
synchronized static void increment(){
x++;
}
}
class First extends Thread {
public void run(){
for(int i= 1 ; i<= 100000 ; i++){
Number.increment();
}
}
}
class Second extends Thread{
public void run(){
for(int i= 1 ; i<= 100000 ; i++){
Number.increment();
}
}
}
class Synchronization{
public static void main(String[] args) {
First f = new First();
Second s = new Second();
f.start ();
s.start();
try{
f.join();
s.join();
} catch (Exception e ){
}
System.out.println("Final x value " + Number.x);
}
}
[9/30, 14:52] ENTREPRENEUR: // creating threads using runnable interface

//runnable interface has only one specification called run()
// we can't start runnable object directly
// we can create the thread object by passing runnable object as parameter
// we can execute the thread logic by starting thread '

public class Main {
public static void main(String[] args) {
First f = new First ();
// f.start (); error
Thread t = new Thread (f);
t.start();
}
}
class First implements Runnable {
public void run(){
System.out.print("thread logic ");
}
}
New code starts after enterpreneur message just copy paste
70codes almost here
😊😊
Some db questions also mentioned
Get ready for tomorrow's drive make it super 😊 good luck
You can share this link with your friends so that they can also get almost all basics codes n everything depending upon their requirement
Photo from ENTREPRENEUR
Starting at the methods static and default methods starting at

Functionalities
Lambda expressions
ForEach method
Method references
Stream API

Using Java using Java technology application development pickup easy millions of millions of applications developed security reasons applications application development process that is increasing traffic YouTube Uploading Facebook So that's why Everyone is not looking for the application development technology is looking for find technology that process the data much faster So that's who thinks one is what So whenever processing that you consider data processing Can you everyone minds only two technologies language and to avoid of uses weekly and easily This is the only reason Just processing Stacking methods
85 minut

What's the how to learn on the concepts
Introduction of Paris metronome very very important reco Is it the only matter expressions Why all basic concepts what they are using in jdk8

Interfaces
Some of the points about the interface Can you define Can we define the method with the body on variables
variables are bydefault public static final.
Collections of abstract methods
And final Whenever you are writing the variable by the time only you should assign the value See that's equals to expected equals to expected Whenever you assign value easy Everyone is thinking that it's intense variable no is public static val how to access How can you prove his final final you cannot quantify the value See if you're trying to quantify the value first A equals to 20 I'm trying to assign the value is 20 cannot assign a value to final variable a is variables are aflix static final how to access a static variables using interface And this is final only one time value is allowed second How can we define another methods

Any class implements Can implements the interface

Implemented class implemented class implemented class overwrite all abstract methods Okay inside I'm trying to write the method
The methodr with body not allowed methods are bydefault Don't need to mention public publico I'm taking one class expect means update name I'm taking second Update means presently modif will be present everything you have to implement That's implements interface what is the class public What's the default access modifier what is access What is the use of access modifier Is used to accessing
Can we apply Access modifiers to blocks
It is public When If you don't represent anything It will take one different package level it is public means it must be publicly So whenever you are trying to compile you will get addressed first So that's must as a public Here it is not visible publicly
And then you create object for interface You cannot read off object or interface directly create option for one class second Whenever you are creating objects for implemented class What is the method namem one is a method
Whenever you create objects for implemented class the ncall
Since JDK 8, It is allowed to define Next static and default methods We access the static methods using the identity of interface an extract method default through object reference
Static
The body definition
Default What is a static method
The second one is
Abstract methods
So in the child class
I can how to access only one type of variable is allowed

Of variable method last name Next I want to access default methods object reference how to create d object Tell me
First obj = new. second()

What type of methods

Static methods
As it is automated some spelling mistakes possible
Interface that allowed it to define Next1 abstract
Define functional using the annotation functional At the rate functional interface
Example
I just want to make it Define 2 methods nor want to make it functional interface I should write at the rate functional interface annotations Now give this interface You are allowed to define only one abstract method Can you try to write the second text whether you will get another message and it is not allowed interface allowed any numbers staticvod M2
Only have talking about the abstract method How many only 1
Public void n c the same story creating object for What is the method name