Sunday 10 June 2018

Ternary Opereator In Java || If Then Else Operator In Java || Java Techn...

Only 3.9% of viewers are subscribing to my channel 😓.
I request you to please give click on Subscribe button.
It really helps me grow 😢.








Ternary Operator in Java

-------------------------------------



- This operator is named so because it is the only operator

to take three operands.



- It is a conditional operator that provides a shorter syntax

   for the if...then...else statement.

 

- The first operand is a Boolean expression, if the expression

   is true then the value of the second operand is returned,

   otherwise the value of the third operand is returned.



----------------------------



Syntax



evaluation part ? codes_of_true : codes_of_false;



--------------------------------------------------------------------



public class Ternary

{

public static void main(String args[])

{

int i = 64;

double k =40.0;

int b = (i>k)?10:5;

System.out.println("b : "+b); //10

b = (i<k)?10:5;

System.out.println("b :"+b); //5

}

}



------------------------------------------------------



public class Ternary1

{

public static void main(String args[])

{

int a=5;

//int b = (int)((a==6)?5:10.0);

System.out.println((a==6)?5:10.5);

}

}



-----------------------------------------------------------

Monday 4 June 2018

Main() Method Is Predefined Or User Defined In Java || Java Technocrat [...




Only 3.9% of viewers are subscribing to my channel 😓.
I request you to please give click on Subscribe button.
It really helps me grow 😢.



#knowledge360channel

Subscribe Technical Vlog Hindi Channel - https://www.youtube.com/c/TechnicalVlogHindi?sub_confirmation=1



You are hearty welcome to my channel.

Please watch all the videos and don't forget to Subscribe my channel.



Follow me on Social Media

--------------------------------------------------

Facebook - https://www.facebook.com/Knowledge-360-1755649231398055/



Instagram - https://www.instagram.com/akkubakku007/



google+ - https://plus.google.com/u/0/116728183002228924227



Blog - https://knowledge360blog.blogspot.in/



Java Technocrat [Hindi]

Learn Java in Hindi with Akram Sohail

Rashmi sir

Rasmi sir

Java Technocrat bhubaneswar

Java Technocrat bbsr

Java Technocrat Cuttack

Java Technocrat ctc

Akram Sohail Tutorial

Akram Sohail Channel

Main() Method Is Predefined Or User Defined || Java Technocrat [Hindi]

main method is predefined or user defined java technocrat hindi

Main() Method Is Predefined Or User Defined In Java || Java Technocrat [Hindi]



Methods in Java - Understanding Java Methods and Their Need

An explanation of Methods in Java. It also explains how a method returns values and how to write your own methods. In this ...

public static void main(String args[]) in Java Explanation (HINDI)

main method in JAVA - Why is it Public, Static and Void.

we all know about the main method's properties of being public, static, void. but why were they defined so ? All answers explained ...

Java Tutorial 13 - User-Defined Methods in Java.mp4

When we create any function first we declare a function then define and call a function.A function return something or nothing, ...

Explain about public static void main(String[] args);

How to use javap Command in Java Tutorial

Using javap command we can get the structure of a class of .class file. It just give you the overall structure of the class i.e fields ...

Defining Class in Java (HINDI/URDU)

Explain Prototype of main Method in Java Hindi

Can we call main method within the same class?

This tutorial explains how to call main method with in same class.What happens if we call main method with in same class.

Can we overload main method in java?

can overload main method java, can we overload main method, can we overload main method in java, can you overload main ...

Java - packages - Builtin and User defined

Java Package - Java API built-in packages - User Defined custom packages A java package is a group of similar types of classes, ...

public static void main(String[] args) | Java

User-Defined Methods

Describes flow of control between main method and user-defined methods.

Can we run java program without main method


Saturday 2 June 2018

What Is Array In Java Explained With Examples | Java Technocrat [Hindi]




Only 3.9% of viewers are subscribing to my channel 😓.
I request you to please give click on Subscribe button.
It really helps me grow 😢.





Source Code

--------------------------------------



public class Data

{

public static void main(String args[])

{

// step -1

int arr[];

String str[];



//sterp-2



arr = new int[3];

str = new String[3];



System.out.println("\nSee the array elements after construction\n");

for(int i =0;i<3;i++)

{

System.out.println(arr[i]);

}



for(int i =0;i<3;i++)

{

System.out.println(str[i]);

}



// step-3



arr[0]=12;

arr[1]=15;

arr[2]=7;



str[0]="Red";

str[1]="Green";

str[2]="Blue";

System.out.println("\nSee the elements after initialistaion\n");



for(int i =0;i<3;i++)

{

System.out.println(arr[i]);

}



for(int i =0;i<3;i++)

{

System.out.println(str[i]);

}

System.out.println(arr[5]); // ArrayIndexOutOfBoundsException

}

}







-----------------------------------------------------------------------------------------