Monday

Variables in swift : syntax with example



In all types of programming languages a variable is a container which holds the value
while the swift program is executed. A variable is assigned with a datatype.
Variable is a name of memory location. 


Swift 6 has a specific type:
  • Character
  • Int or UInt
  • Float 
  • Double
  • Bool
  • String


Variable declaration:


Syntax : var variable_name = <initial_value>


Example : var int a = 10
print(a); 


Result : 10


Swift 4 also allows to define various other types of variables, which we will cover in another post 
such as Optional, Array, Dictionaries, Structures, and Classes.

Thursday

Cloud Firestore for applications and web

Cloud Firestore

Cloud Firestore is a NoSQL document database built for automatic scaling, high performance, and ease of application development. While the Cloud Firestore interface has many of the same features as traditional databases, as a NoSQL database it differs from them in the way it describes relationships between data objects.

Firebase database was enough for basic applications. But it was not powerful enough to handle complex requirements. That is why Cloud Firestore is introduced. Here are some major changes.

  • The basic file structure is improved.

  • Offline support for the web client.

  • Supports more advanced querying.

  • Write and transaction operations are atomic.

  • Reliability and performance improvements

  • Scaling will be automatic.

  • Will be more secure.


In Realtime database of Firebase, it provides only the following features
  • Stores data as one large JSON tree.

  • Simple data is very easy to store.

  • Complex, hierarchical data is harder to organize at scale.

But in Firestone completely different data structure has been followed.
  • Stores data in documents organized in collections.
  • Simple data is easy to store in documents, which are very similar to JSON.

  • Complex, hierarchical data is easier to organize at scale, using subcollections within documents.

  • Requires less denormalization and data flattening.

Wednesday

Java Generics



Generics were added by JDK 5. By using generics you can define an algorithm once, and you can apply it on any kind of datatype without any additional effort.
At very high level, generics are nothing but parameterized types. Generics helps us to create a single class, which can be useful to operate on multiple data types. A class, interface or a method that operates on a parameterized type is called generics class, interface or method. Generics adds type safty. Remember that generics only works on objects, not primitive types.
Example-

package com.netparam.generics;

public class MySimpleGenerics {

    public static void main(String a[]){
         
        //we are going to create SimpleGeneric object with String as type parameter
        SimpleGeneric<String> sgs = new SimpleGeneric<String>("NETPARAM");
        sgs.printType();
        //we are going to create SimpleGeneric object with Boolean as type parameter
        SimpleGeneric<Boolean> sgb = new SimpleGeneric<Boolean>(Boolean.TRUE);
        sgb.printType();
    }
}

/**
 * Here T is a type parameter, and it will be replaced with
 * actual type when the object got created.
 */
class SimpleGeneric<T>{
     
    //declaration of object type T
    private T objReff = null;
     
    //constructor to accept type parameter T
    public SimpleGeneric(T param){
        this.objReff = param;
    }
     
    public T getObjReff(){
        return this.objReff;
    }
     
    //this method prints the holding parameter type
    public void printType(){
        System.out.println("Type: "+objReff.getClass().getName());
    }
}


Output-
Type java.lang.String
Type java.lang.Boolean


Monday

Java Console Class


System class
The System class provides facilities such as the standard input, output and error streams. It also provides means to access properties associated with the Java runtime system and various environment properties such as version, path, vendor and so on. Fields of this class are in, out and err which represent the standard input, output and error respectively.
Java Console Class
The Java Console class is be used to get input from console. Console class comes under Java.io.Console class
Let's see the code to get the instance of Console class.
Console c=System.console();  
Console Example
import java.io.Console;  
class ReadStringTest{    
public static void main(String args[]){    
Console c=System.console();    
System.out.println("Enter your name: ");    
String n=c.readLine();    
System.out.println("Welcome  to "+n);    
}    
}  
Output
Enter your name: Information Tech
Welcome to Information Tech


Sunday

DatagramSocket



The java.net.DatagramSocket class has three constructors:
 public DatagramSocket() throws SocketException
 public DatagramSocket(int port) throws SocketException
 public DatagramSocket(int port, InetAddress laddr) throws SocketException
The first is used for datagram sockets that are primarily intended to act as clients; that is sockets that will send datagrams before receiving any.
The secned two that specify the port and optionally the IP address of the socket, are primarily intended for servers that must run on a well-known port.
The LocalPortScanner developed earlier only found TCP ports. The following program detects UDP ports in use.
import java.net.*;
import java.io.IOException;


public class NetparamScanner {

  public static void main(String[] args) {

    boolean rootaccess = false;
    for (int port = 1; port < 1024; port += 50) {
      try {
        ServerSocket ss = new ServerSocket(port);
        // if successful
        rootaccess = true;
        ss.close();
        break;
      }
      catch (IOException ex) {
      }
    }
   
    int startport = 1;
    if (!rootaccess) startport = 1024;
    int stopport = 65535;
   
    for (int port = startport; port <= stopport; port++) {
      try {
        DatagramSocket ds = new DatagramSocket(port);
        ds.close();
      }
      catch (IOException ex) {
        System.out.println("UDP Port " + port + " is occupied.");
      }
   
    }

  }

}
Since UDP is connectionless it is not possible to write a remote UDP port scanner. The only way you know whether or not a UDP server is listening on a remote port is if it sends something back to you.


DatagramPacket in Java



The DatagramPacket class is a wrapper for an array of bytes from which data will be sent or into which data will be received. It also contains the address and port to which the packet will be sent.
 public DatagramPacket(byte[] data, int length)
 public DatagramPacket(byte[] data, int length, InetAddress host, int port)
You construct a DatagramPacket object by passing an array of bytes and the number of those bytes to send to the DatagramPacket() constructor like this:
 String s = "My first UDP Packet"
  byte[] b = s.getBytes();
  DatagramPacket dp = new DatagramPacket(b, b.length);
Normally you'll also pass in the host and port to which you want to send the packet:
try {
  InetAddress metalab = new InetAddress("netparam.com");
  int chargen = 19;
  String s = "My second UDP Packet"
  byte[] b = s.getBytes();
  DatagramPacket dp = new DatagramPacket(b, b.length, metalab, chargen);
}
catch (UnknownHostException ex) {
  System.err.println(ex);
}
The byte array that's passed to the constructor is stored by reference, not by value. If you cahnge it's contents elsewhere, the contents of the DatagramPacket change as well.
DatagramPackets themselves are not immutable.
You can change the data, the length of the data, the port, or the address at any time with these four methods:
 public void setAddress(InetAddress host)
 public void setPort(int port)
 public void setData(byte buffer[])
 public void setLength(int length)
You can retrieve these items with these four get methods:
 public InetAddress getAddress()
 public int getPort()
 public byte[] getData()
 public int getLength()
These methods are primarily useful when you're receiving datagrams.


рдЗрди рд╕्рдоाрд░्рдЯрдлोрди рд╕े рдиिрдХрд▓рддा рд╣ै рд╕рдмрд╕े рдЬ्рдпाрджा рд░ेрдбिрдПрд╢рди: рд░िрдкोрд░्рдЯ



рднाрд░рдд рдоें рдЖрдП рджिрди рдирдП-рдирдП рд╕्рдоाрд░्рдЯрдлोрди рд▓ॉрди्рдЪ рд╣ो рд░рд╣े рд╣ैं। рдЧ्рд░ाрд╣рдХों рдоें рдмрдЬрдЯ рд╕्рдоाрд░्рдЯрдлोрди рдХी рдХाрдлी рдбिрдоांрдб рд╣ै, рдРрд╕े рдоें рдЬрдм рднी рдЧ्рд░ाрд╣рдХ рдирдпा рдмрдЬрдЯ рдлोрди рдЦрд░ीрджрддे рд╣ैं рддो рдЙрдирдХा рдз्рдпाрди рдХेрд╡рд▓ рд╣ैंрдбрд╕ेрдЯ рдХे рд╕्рдкेрд╕िрдлिрдХेрд╢рди рдкрд░ рдЬाрддा рд╣ै। рдЗрд╕ рдмाрдд рд╕े рд╣рдо рд╕рднी рд╡ाрдХिрдл рд╣ैं рдХि рдлोрди рд╕े рдиिрдХрд▓рдиे рд╡ाрд▓ा рд░ेрдбिрдПрд╢рди рдХिрддрдиा рдЦрддрд░рдиाрдХ рд╣ोрддा рд╣ै।

рдЬрд░्рдорди рдлेрдбрд▓рд░ рдСрдлिрд╕ рдСрдл рд░ेрдбिрдПрд╢рди рдк्рд░ोрдЯेрдХ्рд╢рди рдж्рд╡ाрд░ा рдХी рдЧрдИ рд░िрд╕рд░्рдЪ рдХे рдЖрдХंрдб़े рдЪौंрдХाрдиे рд╡ाрд▓े рд╣ैं। рд╣ाрд▓ рд╣ी рдоें рдЬाрд░ी рд╣ुрдИ рд▓िрд╕्рдЯ рдоें рдЙрди рд╣ैंрдбрд╕ेрдЯ рдХे рдиाрдо рд╢ुрдоाрд░ рд╣ैं рдЬिрдирд╕े рд╕рдмрд╕े рдЬ्рдпाрджा рд░ेрдбिрдПрд╢рди рдиिрдХрд▓рддा рд╣ै।

рдЬрд░्рдорди рдлेрдбрд▓рд░ рдСрдлिрд╕ рдСрдл рд░ेрдбिрдПрд╢рди рдж्рд╡ाрд░ा рджिрдП рдбेрдЯा рдХे рдЖрдзाрд░ рдкрд░ рдЗрд╕ рд▓िрд╕्рдЯ рдХो Statista рдж्рд╡ाрд░ा рд╕ंрдЧृрд╣िрдд рдХिрдпा рдЧрдпा рд╣ै। рд▓िрд╕्рдЯ рдоें рдЙрди 16 рд╕्рдоाрд░्рдЯрдлोрди рдХे рдиाрдо рд╣ैं рдЬिрдирд╕े рд╕рдмрд╕े рдЕрдзिрдХ рд░ेрдбिрд╢рди рдиिрдХрд▓рддा рд╣ै рдФрд░ рдЗрд╕ рд▓िрд╕्рдЯ рдоें рд╕рдмрд╕े рдКрдкрд░ рд╢ाрдУрдоी рдФрд░ рд╡рдирдк्рд▓рд╕ рдм्рд░ांрдб рдХे рдлोрди рд╣ैं। рд╕ैрдорд╕ंрдЧ рдлोрди рдХे рдиाрдо рдЙрд╕ рд▓िрд╕्рдЯ рдоें рд╣ै рдЬिрдирд╕े рдХрдо рд░ेрдбिрд╢рди рдиिрдХрд▓рддा рд╣ै। рд╕ैрдорд╕ंрдЧ рдЧैрд▓ेрдХ्рд╕ी рдиोрдЯ 8 рдХा рд╕्рдкेрд╕िрдлिрдХ рдЕрдм्рдЬॉрд░्рдк्рд╢рди рд░ेрдЯ (рдПрд╕рдПрдЖрд░) 0.17 рд╡ाрдЯ рдк्рд░рддि рдХिрд▓ोрдЧ्рд░ाрдо рд╣ै।

рд╕рдмрд╕े рдкрд╣рд▓े рдмाрдд рд╕рдмрд╕े рдЬ्рдпाрджा рд░ेрдбिрд╢рди рдХрд░рдиे рд╡ाрд▓े рд╕्рдоाрд░्рдЯрдлोрди рдХी। Statista рдж्рд╡ाрд░ा рдкрдм्рд▓िрд╢ рд▓िрд╕्рдЯ рдоें рд╢ाрдУрдоी рдПрдордЖрдИ рдП 1 рд╕рдмрд╕े рдЯॉрдк рдкрд░ рд╣ै, рдЗрд╕рдХा рд╕्рдкेрд╕िрдлिрдХ рдЕрдм्рдЬॉрд░्рдк्рд╢рди рд░ेрдЯ (рдПрд╕рдПрдЖрд░) 1.74 рд╡ाрдЯ рдк्рд░рддि рдХिрд▓ोрдЧ्рд░ाрдо рд╣ै। рд╡рдирдк्рд▓рд╕ 5рдЯी рджूрд╕рд░े рдиंрдмрд░ рдкрд░ рдЖрддा рд╣ै рдЗрд╕рдХा рд╕्рдкेрд╕िрдлिрдХ рдЕрдм्рдЬॉрд░्рдк्рд╢рди рд░ेрдЯ 1.68 рд╡ाрдЯ рдк्рд░рддि рдХिрд▓ोрдЧ्рд░ाрдо рд╣ै। рдПрдордЖрдИ рдоैрдХ्рд╕ 3 рддीрд╕рд░े рдиंрдмрд░ рдкрд░ рд╣ै рдФрд░ рдЗрд╕рдХा рд╕्рдкेрд╕िрдлिрдХ рдЕрдм्рдЬॉрд░्рдк्рд╢рди рд░ेрдЯ 1.58 рд╡ाрдЯ рдк्рд░рддि рдХिрд▓ोрдЧ्рд░ाрдо рд╣ै।



рдпрд╣ां рдкрдв़ें рдЦрдмрд░- https://vigyancode.blogspot.com/p/new.html

New smartphones are being launched in India on the day of visit. Customers have a lot of demand for budget smartphones, so whenever they buy a new budget phone, their focus is only on specification of the handset. We are all aware of how dangerous the radiation emitted from the phone is.

Research reports by the German Fideller Office of Radiation Protection are shocking. In the recently released list, the names of those handsets come from which the maximum radiation emits.

Based on the data provided by the German Fideller Office of Radiation, this list has been collected by Statista. The list contains the names of the 16 smartphones from which the highest number of radiation comes out, and the top of this list is the phones of the MI and OnePlus brands. The name of the Samsung phone is in the list from which the low radiation emits. The Samsung Galaxy Note 8's specific billionarosation rate (SAR) is 0.17 watts per kilogram.

First of all, the most reducing smartphones In the public list by Statista, Mi A1 is at the top, its specific billionaration rate (SAR) is 1.74 watts per kilogram. OnePlus 5T comes second, its specific billionaration rate is 1.68 watt per kilogram. Mi Max 3 is at number three and its specific billionaration rate is 1.58 watts per kilogram.

read full story: https://vigyancode.blogspot.com/p/new.html

рд╣ोंрдбा рдХी 17 рд╕ाрд▓ рдкुрд░ाрдиी рдХाрд░ рдХे рдЕрдм рдирд╣ीं рд╣ोंрдЧे рджीрджाрд░



рдЬाрдкाрди рдХी рдХाрд░ рдиिрд░्рдоाрддा рд╣ोंрдбा рдиे рднाрд░рдд рдоें рдЕрдкрдиी 17 рд╕ाрд▓ рдкुрд░ाрдиी рд╣ैрдЪрдмैрдХ рдХाрд░ рдм्рд░िрдпो рдХा рдЙрдд्рдкाрджрди рдмंрдж рдХрд░ рджिрдпा рд╣ै, рдФрд░ рдЗрд╕ी рдХे рд╕ाрде рдЕрдоेрдЬ рд╣ोंрдбा рдХी рдЕрдм рднाрд░рддीрдп рдмाрдЬाрд░ рдоें рд╕рдмрд╕े рдХрдо рдХीрдордд рдХी рдХाрд░ рдмрди рдЧрдИ рд╣ै। рдм्рд░िрдпो рдХा рдЙрдд्рдкाрджрди рдмंрдж рдХрд░рдиे рдХे рдкीрдЫे рдмрдб़ा рдХाрд░рдг рдЧ्рд░ाрд╣рдХों рдХा рдмрдб़े рдоॉрдбрд▓ों рдоें рджिрд▓рдЪрд╕्рдкी рджिрдЦाрдиा рд╣ै।



рд╣ोंрдбा рдХाрд░्рд╕ рдЗंрдбिрдпा рдХे рд╡рд░िрд╖्рда рдЙрдкाрдз्рдпрдХ्рд╖ рдФрд░ рдиिрджेрд╢рдХ (рдмिрдХ्рд░ी рдФрд░ рд╡िрдкрдгрди) рд░ाрдЬेрд╢ рдЧोрдпрд▓ рдиे ‘рдкीрдЯीрдЖрдИ-рднाрд╖ा’ рдХो рдмрддाрдпा, “рд╣рдоाрд░ी рд╢ुрд░ुрдЖрддी рдХीрдордд рд╡ाрд▓ी рдХाрд░ рдЕрдм рдЕрдоेрдЬ рд╣ै। рд╣рдордиे рдм्рд░िрдпो рдХो рдЙрдд्рдкाрджрди рдмंрдж рдХрд░ рджिрдпा рд╣ै рдФрд░ рдлिрд▓рд╣ाрд▓ рднाрд░рдд рдоें рдм्рд░िрдпो рдХा рдЕрдЧрд▓ा рд╕ंрд╕्рдХрд░рдг рд▓ाрдиे рдХी рд╣рдоाрд░ी рдХोрдИ рдпोрдЬрдиा рдирд╣ीं рд╣ै।

рдЧोрдпрд▓ рдиे рдПрдХ рд╕рд╡ाрд▓ рдХे рдЬрд╡ाрдм рдоें рдХрд╣ा, “рдЕрдоेрдЬ рднाрд░рддीрдп рдмाрдЬाрд░ рдоें рд╣рдоाрд░ी рд╢ुрд░ुрдЖрддी рдХीрдордд рдХी рдХाрд░ рд╣ोрдЧी।” рдЙрди्рд╣ोंрдиे рдХрд╣ा рдХि рдЬैрдЬ рдФрд░ рдбрдм्рд▓्рдпूрдЖрд░-рд╡ी рджो рдЕрди्рдп рдоॉрдбрд▓ рд╣ैं, рдЬो рдЫोрдЯे рдХाрд░ рдХी рдЬрд░ूрд░рддों рдХो рдкूрд░ा рдХрд░ेंрдЧे।рд╣ोंрдбा рдиे рд╕िрддंрдмрд░, 2001 рдоें рдм्рд░िрдпो рдХो рднाрд░рддीрдп рдмाрдЬाрд░ рдоें рдЙрддाрд░ा рдеा рдФрд░ рдЕрдм рддрдХ 97,000 рдХाрд░ों рдХी рдмिрдХ्рд░ी рдХрд░ рдЪुрдХा рд╣ै।

рдиिрд╕ाрди рдХिрдХ्рд╕ рдХो рдоाрдд्рд░ 8 рджिрди рдоें рдоिрд▓े 13 рд╣рдЬाрд░ рдЧ्рд░ाрд╣рдХ



рдиिрд╕ाрди рдХे рд▓िрдП рдСрд▓-рди्рдпू рдХिрдХ्рд╕ рдХॉрдо्рдкैрдХ्рдЯ рдПрд╕рдпूрд╡ी рдПрдХ рдХिрдХ рдХी рддрд░рд╣ рдХाрдо рдХрд░ рд░рд╣ी рд╣ै, рдЬрдирд╡рд░ी 2019 рдоें рдиिрд╕ाрди рдиे рднाрд░рддीрдп рдмाрдЬाрд░ рдоें рдХिрдХ्рд╕ рдПрд╕рдпूрд╡ी рдХी рдХुрд▓ 1,370 рдЗрдХाрдЗрдпां рдмेрдЪी। рдЬिрд╕े 23 рдЬрдирд╡рд░ी рдХो рд▓ॉрди्рдЪ рдХिрдпा рдЧрдпा рдеा।рдпाрдиी рдХिрдХ्рд╕ рдХो рдоाрдд्рд░ 8 рджिрдиों рдоें 1,370 рдЧ्рд░ाрд╣рдХ рдоिрд▓े।



рдХिрдХ्рд╕ рд╕े рдиिрд╕ाрди рдиे рдЕрдХेрд▓े рдбैрдЯрд╕рди рдм्рд░ांрдб рдХो рдЫोрдб़рдХрд░ 55% рдХी рдмिрдХ्рд░ी рдоें рд╡ृрдж्рдзि рдХी। рд╣ाрд▓ांрдХि рдм्рд░ांрдб рдХे рдмाрдХी рдк्рд░ोрдбрдХ्рдЯ рдХा рдк्рд░рджрд░्рд╢рди рдЕрдЪ्рдЫा рдирд╣ीं рд░рд╣ा рдЬिрдирдоें 25% рдХी рдЧिрд░ाрд╡рдЯ рджेрдЦी рдЧрдИ। рднाрд░рддीрдп рдмाрдЬाрд░ рдоें рдЕрдкрдиी рджрд╢ा рд╕ुрдзाрд░рдиे рдХे рд▓िрдП рдиिрд╕ाрди рдХिрдХ्рд╕ рдХो рд▓ॉрди्рдЪ рдХिрдпा рдЧрдпा рдеा।

рдиिрд╕ाрди рдХिрдХ्рд╕ рдХो рднाрд░рдд рдоें 9.50 рд▓ाрдЦ рд░ुрдкрдП рдХे рд╢ुрд░ूрдЖрддी рдоूрд▓्рдп рдХे рд╕ाрде рдЙрддाрд░ा рдЧрдпा। рдЗрд╕ рдк्рд░ाрдЗрд╕ рд░ेंрдЬ рдХे рд╕ाрде рдпрд╣ рдХॉрдо्рдкैрдХ्рдЯ рдПрд╕рдпूрд╡ी рд╣ुंрдбрдИ рдХ्рд░ेрдЯा, рд░ेрдиो рдХैрдк्рдЪрд░ рдФрд░ рдоाрд░ुрддि рдПрд╕-рдХ्рд░ॉрд╕ рдХो рдЯрдХ्рдХрд░ рджेрддी рд╣ै। рдХिрдХ्рд╕ рд╡рд░्рддрдоाрди рдоें рдкेрдЯ्рд░ोрд▓ рдФрд░ рдбीрдЬрд▓ рдЗंрдЬрди рджोрдиों рд╡िрдХрд▓्рдкों рдХे рд╕ाрде рдЙрдкрд▓рдм्рдз рд╣ै।

рд░ेрдирд▓्рдЯ рдбрд╕्рдЯрд░ рдоें рдЖрдпा рдирдпा рдПрдПрдордЯी рд╡ैрд░िрдпंрдЯ, 7.99 рд▓ाрдЦ рд╕े рд╢ुрд░ू

рджेрд╢ рдХे рдмेрд╕्рдЯ рд╕ेрд▓िंрдЧ рдПрд╕рдпूрд╡ी рдоें рд╢ाрдоिрд▓ рд░ेрдирд▓्рдЯ рдбрд╕्рдЯрд░ рдоें рдХुрдЫ рдирдП рдЕрдкрдбेрдЯ рд╢ाрдоिрд▓ рдХिрдП рд╣ैं। рд░ेрдиो рдиे рдбрд╕्рдЯрд░ рдХे рдбीрдЬрд▓ рд╡ैрд░िрдпंрдЯ рдоें рдСрдЯोрдоैрдЯिрдХ рдЯ्рд░ांрд╕рдоिрд╢рди рдХा рдСрдк्рд╢рди рд▓ॉрди्рдЪ рдХिрдпा рд╣ै। рдбрд╕्рдЯрд░ рдЕрдм рдХेрд╡рд▓ рддीрди рд╡ैрд░िрдпंрдЯ рдоें рд╣ी рдоिрд▓ेрдЧी। рдбрд╕्рдЯрд░ рдХा рдоुрдХाрдмрд▓ा рд╣ुंрдбрдИ рдХ्рд░ेрдЯा рдФрд░ рдоाрд░ुрддि рдПрд╕ рдХ्рд░ॉрд╕ рд╕े рд╣ै। рдбрд╕्рдЯрд░ рдкेрдЯ्рд░ोрд▓ рдкेрдЯ्рд░ोрд▓ рдХी рдХीрдордд 7.99 рд▓ाрдЦ рд░ुрдкрдП рд╕े рд╢ुрд░ू рд╣ोрддी рд╣ै, рдЬрдмрдХि рдЯॉрдк рдбीрдЬрд▓ рдХी рдХीрдордд 110рдкीрдПрд╕ RXZ AWD рд╡ैрд░िрдпंрдЯ рдХी рдХीрдордд 13.09 рд▓ाрдЦ рд░ुрдкрдП рд╣ै।




рд░ेрдиो рдиे рдХॉрдо्рдкैрдХ्рдЯ рдПрд╕рдпूрд╡ी рдбрд╕्рдЯрд░ рдХे рд╡ैрд░िрдпंрдЯ рд▓ाрдЗрдирдЕрдк рдоें рдлेрд░рдмрджрд▓ рдХिрдпा рд╣ै। рдЕрдм рдбрд╕्рдЯрд░ рдХे рдкेрдЯ्рд░ोрд▓ рд╡рд░्рдЬрди рдоें рдХेрд╡рд▓ рддीрди рд╣ी рд╡ैрд░िрдпंрдЯ RxE, RxS рдФрд░ RxZ рдоिрд▓ेंрдЧे, рд╡рд╣ीं рдбीрдЬрд▓ рдоें 6 рд╡ैрд░िрдпंрдЯ рд░рд╣ेंрдЧे। рдбрд╕्рдЯрд░ рдиे рдкेрдЯ्рд░ोрд▓ рд╡рд░्рдЬрди рдоें RxL рд╡ैрд░िрдпंрдЯ рдХो рдЦрдд्рдо рдХрд░ рджिрдпा рд╣ै। рдоाрдиा рдЬा рд░рд╣ा рд╣ै рдХि рд░ेрдиो рдиे рдпрд╣ рдлेрд░рдмрджрд▓ рдЕрдЧрд▓े рд╕ाрд▓ рдЕрдк्рд░ैрд▓ 2020 рдоें рд▓ाрдЧू рд╣ोрдиे рд╡ाрд▓ी рдирдП рдмीрдПрд╕-6 рдоाрдирдХों рдХे рдЪрд▓рддे рдЙрдаाрдпा рд╣ै рдФрд░ рд░ेрдиो рдЙрд╕рд╕े рдкрд╣рд▓े рд╣ी рдбрд╕्рдЯрд░ рдХा рд╡рд░्рддрдоाрди рд╕्рдЯॉрдХ рдЦрдд्рдо рдХрд░рдиा рдЪाрд╣рддी рд╣ै।

рд╡рд╣ीं рд░ेрдиो рдбрд╕्рдЯрд░ рдХे рдбीрдЬрд▓ рд╡ैрд░िрдпंрдЯ рдкрд░ 65 рд╣рдЬाрд░ рд░ुрдкрдП рддрдХ рдХे рдСрдлрд░ рдкेрд╢ рдХрд░ рд░рд╣ी рд╣ै। рдЬिрд╕рдоें рд╕рднी рд╡ैрд░िрдпंрдЯ्рд╕ рдкрд░ рдкрд╣рд▓े рд╕ाрд▓ рдоें 1 рд░ुрдкрдП рдЗंрд╢्рдпोрд░ेंрд╕ рдФрд░ 20 рд╣рдЬाрд░ рд░ुрдкрдП рдХा рдХैрд╢ рдбिрд╕्рдХाрдЙंрдЯ рд╢ाрдоिрд▓ рд╣ै। рд╡рд╣ीं рдкेрдЯ्рд░ोрд▓ рд╡ैрд░िрдпंрдЯ्рд╕ рдкрд░ рдХेрд╡рд▓ 20 рд╣рдЬाрд░ рд░ुрдкрдП рдХे рдСрдлрд░ рдоिрд▓ेंрдЧे। рд╕ाрде рд╣ी 5 рд╣рдЬाрд░ рд░ुрдкрдП рдХा рдХाрд░рдкोрд░ेрдЯ рдмोрдирд╕ рднी рдоिрд▓ेрдЧा। рд░ेрдиो рдХे рдоुрддाрдмिрдХ рдпे рдбिрд╕्рдХाрдЙंрдЯ рдХेрд╡рд▓ 2019 рдХे рд╕рднी рд╡ैрд░िрдпंрдЯ्рд╕ рдкрд░ рдоिрд▓ेंрдЧे।

Thursday

InetAddress in Networking



Inet Address encapsulates both numerical IP address and the domain name for that address. Inet address can handle both IPv4 and Ipv6 addresses. Inet Address class has no visible constructor. To create an inet Address object, you have to use Factory methods.
Three commonly used Inet Address factory methods are.
  1. static InetAddress getLocalHost() throws UnknownHostException
  2. static InetAddress getByName (String hostname) throws UnknownHostException
  3. static InetAddress[ ] getAllByName (String hostname) throws UnknownHostException

Example using InetAddress class
import java.net.*;
class Test
{
 public static void main(String[] args)
 {
  InetAddress address = InetAddress.getLocalHost();
  System.out.println(address);
  address = InetAddress.getByName("www.netparam.com");
  System.out.println(address);
  InetAddress sw[] = InetAddress.getAllByName("www.netparam.com");
  for(int i=0; i< sw.length; i++)
  {
   System.out.println(sw[i]);
  }
 }
}
Output:
Welcome-PC/59.161.87.227
www.netparam.com/74.125.236.115
www.netparam.com/74.125.236.116
www.netparam.com/74.125.236.112
www.netparam.com/74.125.236.113
www.netparam.com/74.125.236.114
www.netparam.com/2404:6800:4009:802:0:0:0:1014