Coder Social home page Coder Social logo

carl's Introduction

Carl

Carl is a hedgehog. Yes that is it, Carl is a hedgehog for more information on Carl contact https://github.com/vaishnav04 But instead if you want to know more Java Keep Reading and Enjoy ๐Ÿ˜ƒ

Carl

Introduction

What is object oriented programming

Object oriented programing is used for expressing real-world objects in programming concepts like objects and classes and also to take advantage of features like

  • Inheritance
  • Polymorphism
  • Abstraction
  • Encapsulation

Difference between classes and objects

Classes Objects
A Class is a template or blueprint from which objects are created An Object is an instance of a class
A Class is declared once An Object can be created anynumber of times
Class does not allocate memory when it is created An Object takes up memory when they are created

What is Inheritance ?

Inheritance is the property by which a class or an object can acquires all the properties of the Parent class or object.

What is Polymorphism ?

Polymorphism means performing a task in different ways. There are two types of Polymorphism in java

  1. Compile-time Polymorphism
  2. Run-time Polymorphism

What is an Abstraction ?

Abstraction is the process of hiding the implementation of a class from a user and only shows the required data.

What is Encapsulation ?

The process of wrapping up of the code into a single unit is called Encapsulation.

Naming Conventions in Java

Classes

While naming Classes it is always recomeneded to start with capital letter. Nouns are given the names for Classes and it should be an apropriate word rather than acronyms.

Interface

While naming Interfaces it should always start with capital letter. It should always be an adjective and should be an aproprate word rather than an acronym.

Methods

While naming Methods it should always start with small letter. It should alwaus be a verb.If it contains more than one world the starting of the second word could be Capitalized. example: actionPerformed()

Variables

Variable names should always start with small letters. There should not be any special characters while naming a variable. Naming a variable as x,y,z is not recommended it is better to use something like name, address etc....

Packages

Pacakage names should be lowercase words and each word should be seperated by a dot(.).

Constants

Constants should be named in all caps, example PI. If there are more than one word it is recommended to use and _ to seperate them example THE_VALUE_OF_PI.

carl's People

Contributors

abhijitramesh avatar yashk2000 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.