Drag2Tech Posts

June 16, 2010 /

In my last post, i told you about the Sockets.Now, if you are wondering how many types of sockets are there, lets make it clear.Actually there are three types of sockets but we will be discussing only two of them….The 3 types of internet sockets are: Datagram sockets, also known as connectionless sockets, which use User Datagram Protocol (UDP) Stream sockets, also known as connection-oriented sockets, which use Transmission Control Protocol (TCP) or Stream Control Transmission Protocol (SCTP). Raw sockets (or Raw IP sockets), typically available in routers and other network equipment. Here the transport layer is bypassed, and the…

Read the PostTypes of Sockets

June 16, 2010 /

This is for my friends who want to have some basic knowledge about networking.So let’s start with sockets. WHAT DO YOU MEAN BY SOCKETS? You hear talk of “sockets” all the time, and perhaps you are wondering just what they are exactly. Well, they’re this: a way to speak to other programs using standard Unix file descriptors.What?Ok—you may have heard some Unix hacker state, “Jeez, everything in Unix is a file!” What that person may have been talking about is the fact that when Unix programs do any sort of I/O, they do it by reading or writing to a…

Read the PostSockets

June 16, 2010 /

Garbage collection is the process of automatically finding memory blacks that are no longer being used (“garbage”), and making them available again. In contrast to manual deallocation that is used by many languages, eg C and C++, Java automates this error-prone process. Manual deallocation The area of memory where blocks are dynamically allocated is called the heap. In many programming languages (eg, C++) the programmer generally has to keep track of allocations and deallocations. Manually managing the allocation and deallocation (freeing) of memory is not only difficult to code, it is also the source of a large number of extremely…

Read the PostGarbage Collection

June 16, 2010 /

Java’s import is not the same as C++’s #include 1.  C++’s #include is commonly used to for library headers, but the mechanism which is used is fundamentally  different. #include inserts the entire source file that is referenced into your C++ program. In contrast, the Java import statement only looks up the the identifiers and their declarations from the compiled class file (not the source files). 2.  Another difference is that Java imports are non-transitive. If class A imports packagex and packagex imports packagey, class A does NOT get access to packagey. In C++, the imports are transitive, which can lead…

Read the PostDifference between C++’s #include and JAVA’s import

June 16, 2010 /

Packages = directories. Multiple classes of larger programs are grouped together into a package. Packages correspond to directories in the file system, and may be nested just as directories are nested. Small, single-class, programs typically do not use packages. Importing all classes from a package using * Java libraries are organized in packages (directories). The most common way to get access to them is to use the import statement. For example, import java.util.*;. . .ArrayList studentNames; // ArrayList is a class in  java.util gives your program access to the all (that’s what the “*” means) classes in the package java.util.…

Read the PostPackages in JAVA

June 10, 2010 /

Lesson Series No. 1 •Java 01: Hello World •Java 02: Variables •Java 03: Functions •Java 04: If & Switch Statements •Java 05: While & For Loops Statements •Java 06: Basic Classes •Java 07: Namespace & User Input •Java 08: Advanced Arrays •Java 09: Inheritence, Abstract Classes & Methods •Java 10: Interfaces Find Us on Facebook: http://www.facebook.com/#!/apps/application.php?id=101616986619954

Read the PostVideo lessons: part1

June 10, 2010 /

 What is TCP/IP? TCP/IP (Transmission Control Protocol/Internet Protocol) is the basic communication language or protocol of the Internet. It can also be used as a communications protocol in a private network (either an intranet or an extranet). When you are set up with direct access to the Internet, your computer is provided with a copy of the TCP/IP program just as every other computer that you may send messages to or get information from also has a copy of TCP/IP.TCP/IP is a two-layer program. The higher layer, Transmission Control Protocol, manages the assembling of a message or file into smaller…

Read the PostTCP/IP