Showing posts with label Learn Java in Satellite-Ahmedabad. Show all posts
Showing posts with label Learn Java in Satellite-Ahmedabad. Show all posts

Thursday, July 21, 2022

The Importance of Data Type

 It is a technique which decides the type of data should consider while performing the different operation on different data.



Why Data Types are important

1. The main role of data type is to determine the role of operations to be performed on data. The only thing they do is to process data. To perform the proper operation on data the entered must be converted into some type of data that conforms to the requirements of the algorithm that solves the problem (and that is converted into a computer program by encoding it into some programming language).

2. In program languages without declaring data types, the burden is on the interpreter / compiler to do all the necessary operations the scenes to optimally map our computation to the underlying hardware. Data types are always important part for the language abstraction.

Syntax: <Data Type><Variable Name>=Some Value

Example:-  int a=10;

As mentioned in above example int ‘a’ is integer type of data also ‘a’ is name of variable which only accepts integer value. Here we have already defined the value of variable ‘a’ is equal=10;

Different types of Data

1. Integer

This type of data only accepts integer value.

For Example:- int x=10.

2. Char

This type of data accepts only character value.

For Example:- char c=20.

3. Float

This type of data accepts only floats value.

For Example:- float f=1.32

4. Array

It is nothing but collection of same data type of that are in group of elements to perform any particular operation on data.

TCCI Computer Coaching Institute located Satellite in Ahmedabad. We educate distinctive sort of Programming Languages like C, C++, Data Structure, HTML, CSS, JavaScript and so on. Lectures conducted as per students’ flexible time.

For More Information:                                    

Call us @ 9825618292

Visit us @ http://tccicomputercoaching.com

Friday, March 20, 2020

What is method overriding in Java? - tccicomputercoaching.com


When method of child class redefines the method of parent class then it is called method overriding in Java.



Overriding is done so that a child class can give its own implementation to a method which is already provided by the parent class. In this case the method in parent class is called overridden method and the method in child class is called overriding method.

A method can only be written in Subclass not in same class. The argument list should be exactly the same as that of the overridden method. The return type should be the same or a sub type of the return type declared in the original overridden method in the super class. A method declared final cannot be overridden.

Example:

  1. class Human
  2. { publicvoid eat()
  3. { System.out.println("Human is eating"); }}
  4. class Boy extends Human
  5. { publicvoid eat()
  6. { System.out.println("Boy is eating"); }
  7. publicstaticvoid main( String args[])
  8. { Boy obj = new Boy(); obj.eat(); }}
To learn more in detail about Java at TCCI.

Call us @ 9825618292

Visit us @ http://tccicomputercoaching.com

Tuesday, November 6, 2018

Which one is better for a beginner, C++ or Java?tccicomputercoaching.com

First start from C, then C++, then Java.

Even if you wish to have Java as your primary programming language you must give some time to C & C++, may be a month to C & then two months to C++, you'll have pretty good command over the basics of programming, then move towards Java.

Because Java gives you so many things pre-built in you will not get much of the basic to practice, so it won't be a healthier step to go with java directly.

To learn c++ and Java programming Language at TCCI .

Call us 98256 18292.

Visit us @ http://tccicomputercoaching.com/