All the posts and topics that contain only an error report will be moved here after the error is corrected. This is to ensure that when users view a question in ETS Viewer, the "Discuss" button will not indicate the presence of a discussion that adds no value to the question.
	Moderators:  Site Manager , fjwalraven 
			
		
				
			
				
																			
								sirtomash 							 
									
		Posts:  4 		Joined:  Mon Oct 17, 2016 8:45 am 		
		
						
							
				Contact: 
				
			 
				
		 
		
						
						
													
							
						
									
						Post 
					 
								by sirtomash   »  Wed Dec 30, 2020 9:44 am 
			
			
			
			
			I think this option is not correct not only because of lack of 
getAsDouble()  call:
Code: Select all 
 
double average = nums.parallelStream().mapToInt(i->i).average();
also 
parallelStream()  is not correct for Stream. I guess this shall be 
Code: Select all 
double average = nums.parallel().mapToInt(i->i).average().getAsDouble(); 
			
			
									
									
						 
		 
				
		
		 
	 
	 
				
		
				
			
				
																			
								admin 							 
						Site Admin 			
		Posts:  10443 		Joined:  Fri Sep 10, 2010 9:26 pm 		
		
						
							
				Contact: 
				
			 
				
		 
		
						
						
													
							
						
									
						Post 
					 
								by admin   »  Wed Dec 30, 2020 10:08 am 
			
			
			
			
			I see that it has already been changed to parallel. Which question bank are you using?
			
			
									
									
						 
		 
				
		
		 
	 
	 
				
		
				
			
				
																			
								teodorj 							 
									
		Posts:  28 		Joined:  Tue Jun 19, 2018 10:27 am 		
		
						
							
				Contact: 
				
			 
				
		 
		
						
						
													
							
						
									
						Post 
					 
								by teodorj   »  Sun Jan 10, 2021 10:42 am 
			
			
			
			
			double average = nums.parallelStream().mapToInt(i->i).average();  
 
In 817, it is not changed to parallel() 
question bank version 1/21
			
			
									
									
						 
		 
				
		
		 
	 
	 
				
		
				
			
				
																			
								admin 							 
						Site Admin 			
		Posts:  10443 		Joined:  Fri Sep 10, 2010 9:26 pm 		
		
						
							
				Contact: 
				
			 
				
		 
		
						
						
													
							
						
									
						Post 
					 
								by admin   »  Sun Jan 10, 2021 11:14 pm 
			
			
			
			
			Oh, you mean in the wrong option.  
Explanation has now been added to include this point as well. 
thank you for your feedback!
			
			
									
									
						 
		 
				
		
		 
	 
	 
	
	
	
		
		Users browsing this forum: No registered users and 13 guests