Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners printf and println
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


siti umairah
printf and println
1 Answer(s)      4 years and a month ago
Posted in : Java Beginners


what is the differences between printf and println?


Advertisement
View Answers

December 8, 2010 at 4:45 PM


Hi Friend,

The println prints the text on a new line, where as printf prints the text on the same line.

Thanks



Related Tutorials/Questions & Answers:
printf and println
printf and println  what is the differences between printf and println?   Hi Friend, The println prints the text on a new line, where as printf prints the text on the same line. Thanks
For printing out strings, there are echo, print and printf. Explain the differences.
For printing out strings, there are echo, print and printf. Explain the differences.  For printing out strings, there are echo, print and printf. Explain the differences
Advertisements
Can u print in turbo c 9 8 7 6 5 4 3 2 1 0 using pre increment operator Only use print ++a in the same printf() command ten times)
Can u print in turbo c 9 8 7 6 5 4 3 2 1 0 using pre increment operator Only use print ++a in the same printf() command ten times)  Can u print... ++a in the same printf() command ten times
Can u print in turbo c 9 8 7 6 5 4 3 2 1 0 using pre increment operator Only use print ++a in the same printf() command ten times)
Can u print in turbo C  Can u print in turbo c 9 8 7 6 5 4 3 2 1 0 using pre increment operator Only use print ++a in the same printf() command ten times
3
java.io package  The java.io package includes a PrintStream class that has two formatting methods that we can use to replace print () and println...;The methods are printf() and format().These methods writes a formatted string
>, <
>, <  main() { float a=0.7; if(a<0.7) printf("lesser"); else printf("greater"); } Output: lesser main() { float a=1.2; if(a<1.2) printf("lesser"); else printf("greater"); } Output: greater HOW
Java IO PrintWriter
)   printf(Locale l, String format, Object... args) : This method... and arguments, to the writer. Syntax : public PrintWriter printf(Locale l, String format, Object... args)   printf(String format, Object... args) : This method
Tricky
Tricky  if() printf("Hello") else printf("world") what should be he condition such that o/p is both hello and world as helloworld
Convert To Java Program - Java Beginners
check(); void main() { int num; printf("\nMenu\n"); printf("1-Add\n"); printf("2-Delete\n"); printf("3-Insert\n"); printf("4-Display\n"); printf... add() { printf("Enter value: "); scanf("%d",&array[cntr]); cntr
program of c
program of c  write a program in c to display a to z without using printf or scanf statements or header files
c programe
++){ printf("%d",j); } for(int j = 0; j < 5-i; j++){ printf(" "); } for(int j=i;j>=1;j--){ printf("%d",j); } printf("\n"); getch(0
programs
programs  define SQ(x)x*x main() { int a=SQ(2+1); printf("%d
programs
programs  define SQ(x)x*x main() { int a=SQ(2+1); printf("%d
jan
jan  write code to input a word and printf the next consecutive letter of each alphabet input :EARTH output :FBSUI
C program - SQL
void main() { int i,j; int * pt; clrscr(); printf(" "); printf("\n...=&k; printf("%4d", *pt); } printf("\n"); } getch(); } Thanks
ANZ PLZ
ANZ PLZ  FIND DISCRIPTION ABOUT print () and println ()METHODS  ... the output: hellohi The println() method prints on a new line. It makes the cursor to be placed in the next line of the displayed command. For example: println
JSP - EJB
JSP scriptlet tag out println  What is the JSP scriptlet tag out println
java
java  what 2 access modifiers that can encapsulate the attributes of class?? and what is the concept of printf?   Hello Friend, Public and Private can encapsulate the attributes of class. Printf formats the strings
implementation of stacks using linked lists in c++
choice,data; clrscr(); while(1){ printf("\n1.Push\n2.Pop\n3.Display\n4.Exit\n"); printf("\nEnter ur choice:"); scanf("%d",&... *)malloc(sizeof(struct node)); printf("Enter a node data :"); scanf
C Program to Print Pascal Triangle - Development process
void main(){ int a[15][15],i,j,rows,num=25,k; printf("\n enter the number of rows:"); scanf("%d",&rows); for(i=0;i=0;k--) printf(" "); for(j=0;j<...]; } printf("%4d",a[i][j]); } printf("\n"); } getch(); } Thanks
Managment
); gotoxy(27,2); printf("SUFYAN COMPANY Pvt.(Ltd.)"); gotoxy(35,3); printf("MAIN MENU"); lin(1,80,4,205); gotoxy(28,7); printf("1. ADDITION OF RECORD"); gotoxy(28,8
Managment
); gotoxy(27,2); printf("SUFYAN COMPANY Pvt.(Ltd.)"); gotoxy(35,3); printf("MAIN MENU"); lin(1,80,4,205); gotoxy(28,7); printf("1. ADDITION OF RECORD"); gotoxy(28,8
Managment
); gotoxy(27,2); printf("SUFYAN COMPANY Pvt.(Ltd.)"); gotoxy(35,3); printf("MAIN MENU"); lin(1,80,4,205); gotoxy(28,7); printf("1. ADDITION OF RECORD"); gotoxy(28,8
Managment
); gotoxy(27,2); printf("SUFYAN COMPANY Pvt.(Ltd.)"); gotoxy(35,3); printf("MAIN MENU"); lin(1,80,4,205); gotoxy(28,7); printf("1. ADDITION OF RECORD"); gotoxy(28,8
Managment
); gotoxy(27,2); printf("SUFYAN COMPANY Pvt.(Ltd.)"); gotoxy(35,3); printf("MAIN MENU"); lin(1,80,4,205); gotoxy(28,7); printf("1. ADDITION OF RECORD"); gotoxy(28,8
goto statement problem. reply fast.
; clrscr(); rep : printf("\nEnter the value rs"); scanf("%f",&rs); p=rs*100; printf("\n\npaisa =%2.f ",p); printf("\n do you want...; char z='y'; clrscr(); while(z=='y') { printf("\nEnter
C Program to Print Stras - Development process
; int j=0; for(i=1;i<=4;i+=1){ printf("\n"); for(j=1;j<=i;j++) printf("*"); } printf("\n"); for(i=3;i>=0;i-=1){ for(j=0;j
Sum of array element in C
(); printf("Enter five elements for an array \n"); read(a,5); printf("The list elements are \n"); display(a,5); for(i=0;i<5;i++) { sum+=a[i]; } printf("The sum of the elements
C Program for Addtion of 2*2 Diagnol Matrix - Development process
],b[2][2],c[2][2],i,j; clrscr(); printf("Enter the First matrix:\n"); for(i=0;i<2;i++) { for(j=0;j<2;j++){ scanf("%d",&a[i][j]); } } printf("\nThe First matrix is:\n"); for(i=0;i<2;i++) { printf("\n"); for(j=0;j<2;j
C program - Java Magazine
: #include #include void main(){ int a,b,c,area,ar; clrscr(); printf("Enter first integer:\n"); scanf("%d", &a); printf("Enter second integer:\n"); scanf("%d", &b); printf("Enter third integer:\n"); scanf("%d
Push and Pop operation of stack.
) { *top = *top + 1; stack[*top] = value; printf("\nStack element should be less than four\n"); } else { printf("\nThe stack is full... - 1; } else { printf("\nThe stack is empty can not pop a value
Advertisements
 

 

 

DMCA.com