Hardest Programming Language
In my view the toughest programming language is C# and JAVA cuz they have very vast library and their code are tough enough. Post comment… Read More »Hardest Programming Language
In my view the toughest programming language is C# and JAVA cuz they have very vast library and their code are tough enough. Post comment… Read More »Hardest Programming Language
As we know that java is made by the C programming. The java has many common features to C language. While we wants to print in java we usually use the following code.
1 2 3 |
System.out.println(<em>statement1</em>); or System.out.print(<em>statement2</em>); |
But there is also the feature of printf in java which we used to do in C programming:
Syntax:
1 2 3 4 5 |
//In C language <strong>printf</strong>("format_string", comma_separated_list_of_expressions); //In JAVA System.out.<strong>printf</strong>("format_string", separated_list_of_expressions); |
For eg:
1 2 3 4 5 6 |
//In C we use void main(){ int sum = 4; printf("The sum is %d , sum); } |
which outputs like this in C :
But in JavaRead More »Java’s Print similarities to C